-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(Select): mui styles refactor Closes #646
- Loading branch information
1 parent
84e86e9
commit 41882e4
Showing
4 changed files
with
81 additions
and
72 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
packages/geoview-core/src/ui/select/custom-select-style.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { Theme } from '@mui/material/styles'; | ||
|
||
export const getSxClasses = (theme: Theme) => ({ | ||
formControl: { | ||
width: '50%', | ||
margin: '15px 0', | ||
'& .MuiFormLabel-root.Mui-focused': { | ||
color: theme.palette.primary.contrastText, | ||
background: theme.palette.primary.light, | ||
}, | ||
'& .MuiOutlinedInput-root.Mui-focused': { | ||
border: `1px solid ${theme.palette.primary.contrastText}`, | ||
}, | ||
}, | ||
label: { | ||
position: 'absolute', | ||
left: 0, | ||
top: 0, | ||
transform: 'translate(14px, -9px) scale(0.75)', | ||
background: theme.palette.primary.light, | ||
}, | ||
select: { | ||
width: '100%', | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import { Theme } from '@mui/material/styles'; | ||
|
||
export const getSxClasses = (theme: Theme) => ({ | ||
formControl: { | ||
fontSize: 14, | ||
width: '100%', | ||
marginBottom: '16px', | ||
color: theme.palette.text.primary, | ||
'& .MuiOutlinedInput-notchedOutline': { | ||
border: `1px solid ${theme.palette.border.primary}`, | ||
padding: '0 12px 0 8px', | ||
'&[aria-hidden="true"]': { | ||
border: `1px solid ${theme.palette.border.primary}`, | ||
}, | ||
}, | ||
'&:hover': { | ||
'& .MuiOutlinedInput-notchedOutline': { | ||
border: `1px solid ${theme.palette.border.primary}`, | ||
}, | ||
}, | ||
'& .MuiFormLabel-root.Mui-focused': { | ||
color: theme.palette.primary.contrastText, | ||
background: theme.palette.primary.light, | ||
}, | ||
'& .MuiSelect-select': { | ||
padding: '16px 12px', | ||
}, | ||
'& .MuiSvgIcon-root': { | ||
color: theme.palette.text.primary, | ||
}, | ||
}, | ||
label: { | ||
color: theme.palette.text.primary, | ||
fontSize: 16, | ||
}, | ||
menuItem: { | ||
fontSize: 14, | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters