Skip to content

Commit

Permalink
fix style of header padding
Browse files Browse the repository at this point in the history
  • Loading branch information
sstraatemans committed Nov 7, 2024
1 parent f1aa870 commit 4ab23b4
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 15 deletions.
16 changes: 9 additions & 7 deletions packages/apps/dev-wallet/src/App/Layout/SideBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ import {
MonoBackupTable,
MonoContacts,
MonoContrast,
MonoDarkMode,
MonoKey,
MonoLightMode,
MonoLogout,
MonoNetworkCheck,
MonoSignature,
Expand All @@ -23,8 +25,6 @@ import {
import {
SideBarItem,
SideBarItemsInline,
SideBarTree,
SideBarTreeItem,
SideBar as SideBarUI,
useLayout,
} from '@kadena/kode-ui/patterns';
Expand Down Expand Up @@ -52,7 +52,7 @@ export const SideBar: FC = () => {
<NetworkSelector
showLabel={isExpanded}
variant="outlined"
isCompact={!isExpanded}
isCompact
/>
</SideBarItem>
}
Expand Down Expand Up @@ -115,8 +115,8 @@ export const SideBar: FC = () => {
<ContextMenu
trigger={
<Button
isCompact={!isExpanded}
variant="outlined"
isCompact
variant={isExpanded ? 'outlined' : 'transparent'}
endVisual={<MonoContacts />}
>
{isExpanded ? 'Profile' : undefined}
Expand All @@ -140,9 +140,11 @@ export const SideBar: FC = () => {
label="Change theme"
>
<Button
variant={isExpanded ? 'transparent' : 'outlined'}
variant="transparent"
onPress={() => toggleTheme()}
startVisual={<MonoContrast />}
startVisual={
theme === 'dark' ? <MonoDarkMode /> : <MonoLightMode />
}
isCompact={!isExpanded}
/>
</SideBarItem>
Expand Down
24 changes: 16 additions & 8 deletions packages/libs/kode-ui/src/patterns/SideBarLayout/sidebar.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,12 +244,6 @@ export const listNotExpandedClass = style([
}),
]);

// globalStyle(`${listItemClass} button`, {
// justifyContent: 'flex-start',
// flex: 1,
// });
// globalStyle(`${listItemClass} a`, { justifyContent: 'flex-start', flex: 1 });

export const headerWrapperClass = recipe({
base: [
{
Expand All @@ -266,10 +260,24 @@ export const headerWrapperClass = recipe({
variants: {
sideBarExpanded: {
true: {
paddingInlineStart: sideBarWidth,
...responsiveStyle({
xs: {
paddingInlineStart: token('spacing.md'),
},
md: {
paddingInlineStart: sideBarWidth,
},
}),
},
false: {
paddingInlineStart: sideBarMinWidth,
...responsiveStyle({
xs: {
paddingInlineStart: token('spacing.md'),
},
md: {
paddingInlineStart: sideBarMinWidth,
},
}),
},
},
},
Expand Down

0 comments on commit 4ab23b4

Please sign in to comment.