fix(striker-ui): wrap Slider with FormControl to ensure label styling

This commit is contained in:
Tsu-ba-me 2022-05-03 15:23:50 -04:00
parent d4887f7f2c
commit 67b360946d

View File

@ -8,6 +8,7 @@ import {
sliderClasses as muiSliderClasses, sliderClasses as muiSliderClasses,
SliderProps as MUISliderProps, SliderProps as MUISliderProps,
TypographyProps as MUITypographyProps, TypographyProps as MUITypographyProps,
FormControl,
} from '@mui/material'; } from '@mui/material';
import { BORDER_RADIUS, GREY } from '../lib/consts/DEFAULT_THEME'; import { BORDER_RADIUS, GREY } from '../lib/consts/DEFAULT_THEME';
@ -183,7 +184,7 @@ const Slider = ({
}; };
return ( return (
<Box sx={{ display: 'flex', flexDirection: 'column' }}> <FormControl sx={{ display: 'flex', flexDirection: 'column' }}>
<OutlinedInputLabel <OutlinedInputLabel
{...{ {...{
className: isFocused ? muiInputLabelClasses.focused : '', className: isFocused ? muiInputLabelClasses.focused : '',
@ -243,7 +244,7 @@ const Slider = ({
}, },
})} })}
</Box> </Box>
</Box> </FormControl>
); );
}; };