mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-19 20:17:06 +02:00
* refactor(v2): use functional component + react hooks for App * docusaurus/link * nits * review
25 lines
637 B
JavaScript
25 lines
637 B
JavaScript
/**
|
|
* Copyright (c) 2017-present, Facebook, Inc.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
import React from 'react';
|
|
import Link from '@docusaurus/Link';
|
|
import classnames from 'classnames';
|
|
|
|
import styles from './styles.module.css';
|
|
|
|
export default function SidebarLink({href, label}) {
|
|
return (
|
|
<li className={styles.sidebarListItem}>
|
|
<Link
|
|
activeClassName={styles.sidebarLinkActive}
|
|
className={classnames(styles.sidebarLink, styles.sidebarItem)}
|
|
to={href}>
|
|
{label}
|
|
</Link>
|
|
</li>
|
|
);
|
|
}
|