docusaurus/v2/lib/theme/Sidebar/SidebarLink.js
Endilie Yacop Sucipto 8695ed89a6
refactor(v2): use react hooks on root app (#1095)
* refactor(v2): use functional component + react hooks for App

* docusaurus/link

* nits

* review
2018-11-08 10:23:07 +08:00

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>
);
}