-
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.
- Loading branch information
Showing
12 changed files
with
156 additions
and
30 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import Link from 'next/link'; | ||
import { useRouter } from 'next/router'; | ||
import { clsx as cx } from 'clsx'; | ||
|
||
type HeaderLinkProps = { | ||
href: string; | ||
content: string; | ||
}; | ||
|
||
export const HeaderLink = ({ href, content }: HeaderLinkProps) => { | ||
const router = useRouter(); | ||
const active = router.asPath === href; | ||
|
||
return ( | ||
<li | ||
className={cx( | ||
'w-full px-3 py-2 rounded sm:w-fit sm:px-2 sm:py-1.5 lg:px-4 lg:py-3', | ||
active && 'bg-gray-200', | ||
)} | ||
> | ||
<Link href={href}> | ||
<a | ||
className={cx( | ||
'text-xs font-normal lg:text-base', | ||
active ? 'text-gray-900' : 'text-gray-700', | ||
)} | ||
> | ||
{content} | ||
</a> | ||
</Link> | ||
</li> | ||
); | ||
}; |
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,27 @@ | ||
import { clsx as cx } from 'clsx'; | ||
import { DEFAULT_HEIGHT, DEFAULT_WIDTH } from './constants'; | ||
|
||
type AccountIconProps = { | ||
width?: number; | ||
height?: number; | ||
className?: string; | ||
}; | ||
|
||
export const AccountIcon = ({ | ||
width = DEFAULT_WIDTH, | ||
height = DEFAULT_HEIGHT, | ||
className, | ||
}: AccountIconProps) => { | ||
return ( | ||
<svg | ||
className={cx('fill-gray-600', className)} | ||
xmlns="http://www.w3.org/2000/svg" | ||
width={width} | ||
height={height} | ||
viewBox="0 0 24 24" | ||
> | ||
<path d="M0 0h24v24H0V0z" fill="none" /> | ||
<path d="M12 5.9c1.16 0 2.1.94 2.1 2.1s-.94 2.1-2.1 2.1S9.9 9.16 9.9 8s.94-2.1 2.1-2.1m0 9c2.97 0 6.1 1.46 6.1 2.1v1.1H5.9V17c0-.64 3.13-2.1 6.1-2.1M12 4C9.79 4 8 5.79 8 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 9c-2.67 0-8 1.34-8 4v2c0 .55.45 1 1 1h14c.55 0 1-.45 1-1v-2c0-2.66-5.33-4-8-4z" /> | ||
</svg> | ||
); | ||
}; |
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 |
---|---|---|
@@ -1,21 +1,27 @@ | ||
import { clsx as cx } from 'clsx'; | ||
import { DEFAULT_HEIGHT, DEFAULT_WIDTH } from './constants'; | ||
|
||
type MenuIconProps = { | ||
width: number; | ||
height: number; | ||
width?: number; | ||
height?: number; | ||
className?: string; | ||
}; | ||
|
||
export const MenuIcon = ({ width, height, className }: MenuIconProps) => { | ||
export const MenuIcon = ({ | ||
width = DEFAULT_WIDTH, | ||
height = DEFAULT_HEIGHT, | ||
className, | ||
}: MenuIconProps) => { | ||
return ( | ||
<svg | ||
className={cx('fill-gray-700', className)} | ||
className={cx('fill-gray-600', className)} | ||
xmlns="http://www.w3.org/2000/svg" | ||
width={width} | ||
height={height} | ||
viewBox="0 0 24 24" | ||
> | ||
<path d="M3 18v-2h18v2Zm0-5v-2h18v2Zm0-5V6h18v2Z" /> | ||
<path d="M0 0h24v24H0V0z" fill="none" /> | ||
<path d="M4 18h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1s.45 1 1 1zm0-5h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1s.45 1 1 1zM3 7c0 .55.45 1 1 1h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1z" /> | ||
</svg> | ||
); | ||
}; |
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,27 @@ | ||
import { clsx as cx } from 'clsx'; | ||
import { DEFAULT_WIDTH, DEFAULT_HEIGHT } from './constants'; | ||
|
||
type NotificationsIconProps = { | ||
width?: number; | ||
height?: number; | ||
className?: string; | ||
}; | ||
|
||
export const NotificationsIcon = ({ | ||
width = DEFAULT_WIDTH, | ||
height = DEFAULT_HEIGHT, | ||
className, | ||
}: NotificationsIconProps) => { | ||
return ( | ||
<svg | ||
className={cx('fill-gray-600', className)} | ||
xmlns="http://www.w3.org/2000/svg" | ||
width={width} | ||
height={height} | ||
viewBox="0 0 24 24" | ||
> | ||
<path d="M0 0h24v24H0V0z" fill="none" /> | ||
<path d="M19.29 17.29L18 16v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-1.29 1.29c-.63.63-.19 1.71.7 1.71h13.17c.9 0 1.34-1.08.71-1.71zM16 17H8v-6c0-2.48 1.51-4.5 4-4.5s4 2.02 4 4.5v6zm-4 5c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2z" /> | ||
</svg> | ||
); | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export const DEFAULT_WIDTH = 24; | ||
export const DEFAULT_HEIGHT = 24; |
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
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