@@ -3,9 +3,9 @@ import { ThemeOptions, createTheme, Theme } from "@mui/material/styles"
3
3
import { BODY_FONT_FAMILY , borderRadius } from "./constants"
4
4
5
5
// MUI does not have aligned heights for buttons and inputs so we have to "hack" it a little bit
6
- const BUTTON_LG_HEIGHT = 42
7
- const BUTTON_MD_HEIGHT = 36
8
- const BUTTON_SM_HEIGHT = 30
6
+ export const BUTTON_LG_HEIGHT = 40
7
+ export const BUTTON_MD_HEIGHT = 36
8
+ export const BUTTON_SM_HEIGHT = 32
9
9
10
10
export type PaletteIndex = keyof Theme [ "palette" ]
11
11
export type PaletteStatusIndex = Extract <
@@ -110,6 +110,8 @@ dark = createTheme(dark, {
110
110
} ,
111
111
} ,
112
112
} ,
113
+ // Button styles are based on
114
+ // https://tailwindui.com/components/application-ui/elements/buttons
113
115
MuiButtonBase : {
114
116
defaultProps : {
115
117
disableRipple : true ,
@@ -127,20 +129,26 @@ dark = createTheme(dark, {
127
129
fontWeight : 500 ,
128
130
height : BUTTON_MD_HEIGHT ,
129
131
padding : theme . spacing ( 1 , 2 ) ,
132
+ borderRadius : "6px" ,
133
+ fontSize : 14 ,
130
134
131
135
whiteSpace : "nowrap" ,
132
136
":focus-visible" : {
133
137
outline : `2px solid ${ theme . palette . primary . main } ` ,
134
138
} ,
139
+
140
+ "& .MuiLoadingButton-loadingIndicator" : {
141
+ width : 14 ,
142
+ height : 14 ,
143
+ } ,
144
+
145
+ "& .MuiLoadingButton-loadingIndicator .MuiCircularProgress-root" : {
146
+ width : "inherit !important" ,
147
+ height : "inherit !important" ,
148
+ } ,
135
149
} ) ,
136
150
sizeSmall : {
137
- borderRadius : 6 ,
138
151
height : BUTTON_SM_HEIGHT ,
139
-
140
- "& .MuiCircularProgress-root" : {
141
- width : "14px !important" ,
142
- height : "14px !important" ,
143
- } ,
144
152
} ,
145
153
sizeLarge : {
146
154
height : BUTTON_LG_HEIGHT ,
@@ -174,6 +182,9 @@ dark = createTheme(dark, {
174
182
fontSize : 13 ,
175
183
} ,
176
184
} ,
185
+ startIcon : {
186
+ marginLeft : "-2px" ,
187
+ } ,
177
188
} ,
178
189
} ,
179
190
MuiTableContainer : {
0 commit comments