mirror of
https://github.com/Stone-Red-Code/website.git
synced 2026-09-04 09:15:58 +02:00
feat: make current docs page active
This commit is contained in:
@@ -131,7 +131,11 @@ const ALL_DOCS = graphql`
|
||||
|
||||
const plantTree = (item: IFileOrFolder) => {
|
||||
if (item.type === "file") {
|
||||
return <SC.PageLink to={item.path}>{item.title}</SC.PageLink>
|
||||
return (
|
||||
<SC.PageLink to={item.path} activeClassName="active">
|
||||
{item.title}
|
||||
</SC.PageLink>
|
||||
)
|
||||
}
|
||||
|
||||
return <Folder item={item} />
|
||||
|
||||
@@ -11,4 +11,8 @@ export const PageLink = styled(Link)`
|
||||
display: block;
|
||||
padding: 4px 0;
|
||||
color: #1c61df;
|
||||
|
||||
&.active {
|
||||
font-weight: 700;
|
||||
}
|
||||
`
|
||||
|
||||
Reference in New Issue
Block a user