react-icons/bi#BiMenu JavaScript Examples
The following examples show how to use
react-icons/bi#BiMenu.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: sidebar.js From gatsby-starter-breeze with MIT License | 5 votes |
Sidebar = ({ toc }) => {
const { site } = useStaticQuery(
graphql`
query {
site {
siteMetadata {
title
description
sidebarMenu {
url
label
}
social {
douban
email
facebook
github
instagram
linkedin
rss
telegram
twitter
youtube
}
footerHTML
}
}
}
`
)
const [open, setOpen] = useState(false)
const clickHandler = () => {
setOpen(!open)
}
return (
<div className={styles.sidebar + (open ? " " + styles.open : "")}>
<div className={styles.mobileNav}>
<BiMenu className={styles.mobileNav__icon} onClick={clickHandler} />
<Link className={styles.mobileNav__title} to="/">
{site.siteMetadata.title}
</Link>
</div>
<SiteMeta
title={site.siteMetadata.title}
description={site.siteMetadata.description}
/>
<Menu menu={site.siteMetadata.sidebarMenu} />
<SocialLinks social={site.siteMetadata.social} />
<TOC toc={toc} />
<Copyright contentHTML={site.siteMetadata.footerHTML} />
</div>
)
}