From bd462565bcdf59f8b2aef786f9799a2aefd6a44f Mon Sep 17 00:00:00 2001 From: Norbert Csaba Herczeg Date: Sun, 19 May 2024 21:23:07 +0200 Subject: [PATCH] JNG-5729 add style options (#404) --- .../src/main/resources/actor/src/layout/index.tsx.hbs | 3 ++- .../src/main/resources/actor/src/theme/index.tsx.hbs | 10 ++++++++++ .../src/main/resources/actor/src/theme/types.ts.hbs | 2 ++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/judo-ui-react/src/main/resources/actor/src/layout/index.tsx.hbs b/judo-ui-react/src/main/resources/actor/src/layout/index.tsx.hbs index 630aef55..c9735cff 100644 --- a/judo-ui-react/src/main/resources/actor/src/layout/index.tsx.hbs +++ b/judo-ui-react/src/main/resources/actor/src/layout/index.tsx.hbs @@ -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'; @@ -50,7 +51,7 @@ export const Layout = () => { minHeight: 'calc(100vh - 110px)', display: 'flex', flexDirection: 'column', - mt: 12, + mt: density.mainMarginTop ?? 12, } } > diff --git a/judo-ui-react/src/main/resources/actor/src/theme/index.tsx.hbs b/judo-ui-react/src/main/resources/actor/src/theme/index.tsx.hbs index fee891fb..8a76d080 100644 --- a/judo-ui-react/src/main/resources/actor/src/theme/index.tsx.hbs +++ b/judo-ui-react/src/main/resources/actor/src/theme/index.tsx.hbs @@ -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' }}, diff --git a/judo-ui-react/src/main/resources/actor/src/theme/types.ts.hbs b/judo-ui-react/src/main/resources/actor/src/theme/types.ts.hbs index 2e16c63d..42a5f279 100644 --- a/judo-ui-react/src/main/resources/actor/src/theme/types.ts.hbs +++ b/judo-ui-react/src/main/resources/actor/src/theme/types.ts.hbs @@ -8,4 +8,6 @@ export interface Density { borderRadius: number, dataGridDensity?: 'compact' | 'standard' | 'comfortable', isListDense?: boolean, + mainMarginTop?: number, + cardContentPadding?: number, }