mirror of
https://github.com/primer/css.git
synced 2024-11-30 19:53:11 +03:00
13 lines
373 B
JavaScript
13 lines
373 B
JavaScript
import React from 'react'
|
|
import {withRouter} from 'next/router'
|
|
import {Box} from '@primer/components'
|
|
import PageLink from './PageLink'
|
|
|
|
const SectionLink = withRouter(({href, router, ...rest}) => (
|
|
<Box {...rest}>
|
|
<PageLink href={href} {...rest} fontSize={2} fontWeight={router.pathname.startsWith(href) ? 'bold' : null} />
|
|
</Box>
|
|
))
|
|
|
|
export default SectionLink
|