Skip to content

Commit 079a9fe

Browse files
Merge pull request #6 from guardiafinance/fix/adjust-navbar-width
fix: make navbar wider due to expandable menu items
2 parents b9eb7bd + e45e8fc commit 079a9fe

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@guardiafinance/design-system",
3-
"version": "0.0.7",
3+
"version": "0.0.8",
44
"type": "module",
55
"exports": {
66
".": {
@@ -87,4 +87,4 @@
8787
"react-router": "^7.9.1",
8888
"zod": "^4.1.8"
8989
}
90-
}
90+
}

src/components/navbar/navbar.tsx

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ function NavbarInternal({
123123
</div>
124124
</SidebarHeader>
125125
</When>
126-
<SidebarContent className="p-3 flex-1">
126+
<SidebarContent className="flex-1">
127127
<SidebarGroup>
128128
<SidebarGroupContent>
129129
<SidebarMenu>
@@ -227,9 +227,16 @@ function NavbarInternal({
227227
</div>
228228
</When>
229229
<When condition={Boolean(settings.footer)}>
230-
<div className="mt-2 flex items-center justify-between px-2 text-[10px] text-brand-fgLight/70 truncate">
231-
{settings.footer?.version && <span className="truncate">{settings.footer.version}</span>}
232-
{settings.footer?.copyright && <span className="truncate">{settings.footer.copyright}</span>}
230+
<div className={`
231+
mt-2 flex px-2 text-[10px] text-brand-fgLight/70
232+
${isCollapsed ? 'flex-col items-center gap-1 text-center' : 'items-center justify-between truncate'}
233+
`}>
234+
<When condition={Boolean(settings.footer?.version)}>
235+
<span className="truncate">{settings.footer?.version}</span>
236+
</When>
237+
<When condition={!isCollapsed && Boolean(settings.footer?.copyright)}>
238+
<span className="truncate">{settings.footer?.copyright}</span>
239+
</When>
233240
</div>
234241
</When>
235242
</SidebarFooter>

src/components/sidebar/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ import {
2424

2525
const SIDEBAR_COOKIE_NAME = "sidebar_state"
2626
const SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7
27-
const SIDEBAR_WIDTH = "16rem"
27+
const SIDEBAR_WIDTH = "15rem"
2828
const SIDEBAR_WIDTH_MOBILE = "18rem"
29-
const SIDEBAR_WIDTH_ICON = "4rem"
29+
const SIDEBAR_WIDTH_ICON = "3rem"
3030
const SIDEBAR_KEYBOARD_SHORTCUT = "b"
3131

3232
type SidebarContextProps = {

0 commit comments

Comments
 (0)