feat(navbar) add fix style

This commit is contained in:
lumither committed 2024-05-27 23:35:29 +08:00
1 parent d855df0d6e
commit bfee26609e
2 files changed
+8 -5

No files matched your search

+4 -4
View File
@@ -65,7 +65,9 @@ function Navbar() {
return ( return (
<> <>
<div className={ `flex flex-col w-full max-w-[256px] mr-2 ml-8 min-h-screen pt-8 sticky` }> <div
className={ `flex flex-col w-full max-w-[256px] mr-2 ml-8 min-h-screen max-h-screen pt-8 sticky` }>
<div className={ `fixed min-h-screen h-full` }>
<div className={ `flex justify-center items-center my-7` }> <div className={ `flex justify-center items-center my-7` }>
<Image <Image
src={ 'https://avatars.githubusercontent.com/u/46409277?v=4' } src={ 'https://avatars.githubusercontent.com/u/46409277?v=4' }
@@ -113,11 +115,9 @@ function Navbar() {
</div> </div>
<div <div
className={ `absolute bottom-0 mb-8` } className={ `absolute bottom-8 mb-8` }
> >
<div className={ `flex flex-row justify-center` }>
<ThemeSwitcher /> <ThemeSwitcher />
<p className={ `font-bold` }>{ `Toggle Theme` }</p>
</div> </div>
</div> </div>
</div> </div>
+4 -1
View File
@@ -18,7 +18,8 @@ function ThemeSwitcher() {
} }
return ( return (
<div> <div className={ `` }>
<div className={ `flex flex-row items-center` }>
<Switch <Switch
color={ 'default' } color={ 'default' }
aria-label={ `theme switch` } aria-label={ `theme switch` }
@@ -32,6 +33,8 @@ function ThemeSwitcher() {
} }
} } } }
></Switch> ></Switch>
<p className={ `font-bold` }>{ `Toggle Theme` }</p>
</div>
</div> </div>
); );
} }