generated from nventive/Template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: adds uikit sidebar + adds utilities for scss + moves some files
- Loading branch information
Charles Héon
committed
Aug 19, 2024
1 parent
625c5c2
commit f61cf46
Showing
10 changed files
with
213 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import Typography from "@components/typography/Typography"; | ||
import "./uikit-nav.scss"; | ||
import Link from "@components/link/Link"; | ||
|
||
export interface INavItem { | ||
text: string; | ||
id: string; | ||
} | ||
|
||
interface IUikitNav { | ||
items: INavItem[]; | ||
} | ||
|
||
function UikitNav({ items }: IUikitNav) { | ||
return ( | ||
<div className="uikit-nav"> | ||
<Typography.Heading6>Components</Typography.Heading6> | ||
<ul className="flex-column gap-xs"> | ||
{items.map((item) => ( | ||
<li key={item.id}> | ||
<Link href={`#${item.id}`}>{item.text}</Link> | ||
</li> | ||
))} | ||
</ul> | ||
</div> | ||
); | ||
} | ||
|
||
export default UikitNav; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
.uikit-nav { | ||
display: none; | ||
|
||
@include media-min(xs) { | ||
display: flex; | ||
flex-direction: column; | ||
gap: get-spacing(xs); | ||
height: 100%; | ||
margin-top: get-spacing(md); | ||
max-width: rem(250); | ||
position: sticky; | ||
top: get-spacing(md); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.