Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: change theme spacing #47

Merged
merged 2 commits into from
Jan 13, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions src/theme/light-theme.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const shadows = [
),
] as Theme['shadows']

const spacing = 5
const spacing = (factor?: number) => Math.floor(factor ?? 1) * 4

const palette = {
mode: 'light',
Expand Down Expand Up @@ -144,8 +144,8 @@ const typography: ThemeOptions['typography'] = {
fontWeightMedium: font_weight_medium,
fontWeightBold: font_weight_bold,
h1: {
marginTop: spacing * 2,
marginBottom: spacing * 2,
marginTop: spacing(2),
marginBottom: spacing(2),
fontWeight: font_weight_bold,
letterSpacing: 0,
fontSize: heading_xl,
Expand Down Expand Up @@ -596,14 +596,14 @@ const lightTheme = createTheme({
MuiFormHelperText: {
styleOverrides: {
root: {
marginTop: spacing,
marginTop: spacing(),
},
},
},
MuiFormLabel: {
styleOverrides: {
root: {
marginBottom: spacing * 2,
marginBottom: spacing(2),
color: `${palette.text.primary} !important`,
fontSize: font_14,
fontWeight: font_weight_medium,
Expand All @@ -626,8 +626,8 @@ const lightTheme = createTheme({
styleOverrides: {
select: {
paddingLeft: '17px',
paddingTop: spacing * 2,
paddingBottom: spacing * 2,
paddingTop: spacing(2),
paddingBottom: spacing(2),
display: 'flex',
alignItems: 'center',
},
Expand All @@ -650,7 +650,7 @@ const lightTheme = createTheme({
MuiMenu: {
styleOverrides: {
root: {
marginTop: spacing * 2,
marginTop: spacing(2),
boxShadow: shadows[24],
},
},
Expand Down Expand Up @@ -761,17 +761,17 @@ const lightTheme = createTheme({
styleOverrides: {
root: {
borderRadius: base_border_radius,
paddingLeft: spacing,
paddingRight: spacing,
paddingLeft: spacing(),
paddingRight: spacing(),
height: 24,
fontWeight: typography.fontWeightBold,
fontSize: font_13,
lineHeight: font_13,
},
label: {
padding: 0,
marginLeft: spacing,
marginRight: spacing,
marginLeft: spacing(),
marginRight: spacing(),
},
icon: {
margin: 0,
Expand Down
Loading