Skip to content

Commit

Permalink
fix(sidenav): show hamburger meny on screen smaller than 768px (#1716)
Browse files Browse the repository at this point in the history
* fix(sidenav): show hamburger meny on screen smaller than 768px

* style(navbar): text primary on demo link
  • Loading branch information
emilielr authored Oct 31, 2024
1 parent 5c00cd1 commit 457f178
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion tavla/app/(admin)/components/HorizontalNavBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function HorizontalNavBar({ loggedIn }: { loggedIn: boolean }) {
if (!loggedIn) return null
return (
<div className="flex-row hidden md:flex gap-4">
<IconButton as={Link} href="?board" className="gap-4 p-4">
<IconButton as={Link} href="?board" className="gap-4">
<AddIcon /> Opprett tavle <CreateBoard />
</IconButton>
<TopNavigationItem
Expand Down
2 changes: 1 addition & 1 deletion tavla/app/(admin)/components/Login/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function Login({ loggedIn }: { loggedIn: boolean }) {
onClick={async () => {
await logout()
}}
className="gap-4 p-4 hidden md:flex"
className="gap-4 !hidden md:!flex"
>
<LogOutIcon />
Logg ut
Expand Down
12 changes: 6 additions & 6 deletions tavla/app/(admin)/components/SideNavBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@ function SideNavBar({ loggedIn }: { loggedIn: boolean }) {
<div className="block md:hidden">
<IconButton
onClick={() => setIsOpen(!isOpen)}
className="bg-contrast rounded-full p-3"
className="!bg-contrast !rounded-full !p-3"
>
<MenuIcon content="Meny" color="background" />
</IconButton>
<Modal
open={isOpen}
onDismiss={() => setIsOpen(false)}
size="medium"
className="!h-full !w-9/12 !fixed !top-0 !left-0 py-10 !max-h-full !rounded-none !p-0 overflow-visible"
size="small"
className="!h-full !w-9/12 !fixed !top-0 !left-0 !max-h-full !rounded-none !p-0 overflow-visible"
>
<SideNavigation className="h-full !pt-10">
<SideNavigation className="!pt-10 !bg-primary">
<div className="pl-10">
<Link href="/" aria-label="Tilbake til landingssiden">
<Image src={TavlaLogoBlue} height={22} alt="" />
Expand All @@ -60,7 +60,7 @@ function SideNavBar({ loggedIn }: { loggedIn: boolean }) {
</SideNavigationItem>
<SideNavigationItem
as={Button}
className="[&>button]:justify-start [&>button]:px-10"
className="[&>button]:justify-start [&>button]:px-10 [&>button]:bg-secondary [&>button]:text-primary"
onClick={async () => {
setIsOpen(false)
await logout()
Expand All @@ -72,7 +72,7 @@ function SideNavBar({ loggedIn }: { loggedIn: boolean }) {
</SideNavigation>
<IconButton
onClick={() => setIsOpen(false)}
className="bg-contrast rounded-full p-3 absolute bottom-[10%] -right-5"
className="!bg-contrast !rounded-full !p-3 !absolute !bottom-[10%] !right-5"
>
<LeftArrowIcon color="background" />
</IconButton>
Expand Down
1 change: 1 addition & 0 deletions tavla/app/(admin)/components/TopNavigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ function TopNavigation({ loggedIn }: { loggedIn: boolean }) {
onClick={() => {
posthog.capture('DEMO_FROM_NAV_BAR_BTN')
}}
className="!text-primary"
>
Prøv Tavla
</TopNavigationItem>
Expand Down

0 comments on commit 457f178

Please sign in to comment.