Skip to content

Commit

Permalink
Merge pull request #286 from TobiTRy/buildIn--globalElementSizes
Browse files Browse the repository at this point in the history
Build in  global element sizes
  • Loading branch information
TobiTRy authored May 7, 2024
2 parents 90cdf25 + 59c02e1 commit fb9881f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"name": "TobiTRy"
},
"private": false,
"version": "0.4.3",
"version": "0.4.4",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
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 fb9881f

Please sign in to comment.