mirror of
https://github.com/Stone-Red-Code/website.git
synced 2026-09-07 16:06:12 +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) => {
|
const plantTree = (item: IFileOrFolder) => {
|
||||||
if (item.type === "file") {
|
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} />
|
return <Folder item={item} />
|
||||||
|
|||||||
@@ -11,4 +11,8 @@ export const PageLink = styled(Link)`
|
|||||||
display: block;
|
display: block;
|
||||||
padding: 4px 0;
|
padding: 4px 0;
|
||||||
color: #1c61df;
|
color: #1c61df;
|
||||||
|
|
||||||
|
&.active {
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
`
|
`
|
||||||
|
|||||||
Reference in New Issue
Block a user