Skip to content

Commit

Permalink
JNG-5729 add style options (#404)
Browse files Browse the repository at this point in the history
  • Loading branch information
noherczeg authored May 19, 2024
1 parent f277d25 commit bd46256
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { usePrincipal } from "~/auth";
{{/ if }}
import { useConfig } from '~/hooks';
import { MenuOrientation, DRAWER_WIDTH } from '~/config';
import { density } from '~/theme';
import { Drawer } from './Drawer';
import { Header } from './Header';
import { Footer } from './Footer';
Expand Down Expand Up @@ -50,7 +51,7 @@ export const Layout = () => {
minHeight: 'calc(100vh - 110px)',
display: 'flex',
flexDirection: 'column',
mt: 12,
mt: density.mainMarginTop ?? 12,
} }
>
<Outlet />
Expand Down
10 changes: 10 additions & 0 deletions judo-ui-react/src/main/resources/actor/src/theme/index.tsx.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,16 @@ const baseTheme = (paletteTheme: Theme) => createTheme(
},
},
},
MuiCardContent: {
styleOverrides: {
root: {
padding: density.cardContentPadding ?? 16,
'&:last-child': {
paddingBottom: density.cardContentPadding ?? 16,
},
},
},
},
},
},
{{ muiTranslationToken (getDefaultLanguage application) 'ForMaterial' }},
Expand Down
2 changes: 2 additions & 0 deletions judo-ui-react/src/main/resources/actor/src/theme/types.ts.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ export interface Density {
borderRadius: number,
dataGridDensity?: 'compact' | 'standard' | 'comfortable',
isListDense?: boolean,
mainMarginTop?: number,
cardContentPadding?: number,
}

0 comments on commit bd46256

Please sign in to comment.