Skip to content

Commit

Permalink
chore: Update themeStore.ts and TTheme.ts to include globalElementSizes
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiTRy committed May 7, 2024
1 parent 90cdf25 commit e5b7c52
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/design/theme/themeStore/themeStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { updateThemeColors, uiColors, IUiColorPops } from '../generateThemeColor
import { spacingPx, borderRadius, typography } from '../designSizes';
import { TTheme } from '@/types/TTheme';
import { breakpoints } from '@/design/theme/brakePoints';
import { globalElementsizes } from '@/design/theme/globalSizes';

type ThemeState = {
theme: TTheme;
Expand All @@ -16,10 +17,11 @@ type ThemeState = {
const themeStore = create<ThemeState>((set) => ({
theme: {
colors: uiColors,
spacing: spacingPx,
borderRadius: borderRadius,
spacing: spacingPx,
fontSizes: typography,
breakpoints: breakpoints,
globalElementSizes: globalElementsizes,
},
isDarkTheme: true,
switchTheme: () => {
Expand Down
4 changes: 4 additions & 0 deletions src/types/TTheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { TUiColorsTypeObject } from './TUiColorsTypeObject';
import { TSpacings } from './TSpacings';
import { breakpoints } from '@/design/theme/brakePoints';
import { TTypographyObj } from '@/components/atoms/Typography/Typography.model';
import { globalElementsizes } from '@/design/theme/globalSizes';

//the structure for the theme object
export type TTheme = {
Expand All @@ -17,4 +18,7 @@ export type TTheme = {
breakpoints: {
[key in keyof typeof breakpoints]: string;
};
globalElementSizes: {
[key in keyof typeof globalElementsizes]: string;
};
};

0 comments on commit e5b7c52

Please sign in to comment.