fix(striker-ui): connect hover state in OutlinedLabeledInputWithSelect

main
Tsu-ba-me 3 years ago
parent e09b736626
commit 61de05569b
  1. 21
      striker-ui/components/OutlinedLabeledInputWithSelect.tsx

@ -1,5 +1,11 @@
import { FC } from 'react'; import { FC } from 'react';
import { Box } from '@mui/material'; import {
Box,
formControlClasses as muiFormControlClasses,
outlinedInputClasses as muiOutlinedInputClasses,
} from '@mui/material';
import { GREY } from '../lib/consts/DEFAULT_THEME';
import InputMessageBox from './InputMessageBox'; import InputMessageBox from './InputMessageBox';
import { MessageBoxProps } from './MessageBox'; import { MessageBoxProps } from './MessageBox';
@ -36,10 +42,10 @@ const OutlinedLabeledInputWithSelect: FC<
> = ({ > = ({
id, id,
label, label,
inputWithLabelProps, inputWithLabelProps = OUTLINED_LABELED_INPUT_WITH_SELECT_DEFAULT_PROPS.inputWithLabelProps,
messageBoxProps, messageBoxProps = OUTLINED_LABELED_INPUT_WITH_SELECT_DEFAULT_PROPS.messageBoxProps,
selectItems, selectItems,
selectWithLabelProps, selectWithLabelProps = OUTLINED_LABELED_INPUT_WITH_SELECT_DEFAULT_PROPS.selectWithLabelProps,
}) => ( }) => (
<Box> <Box>
<Box <Box
@ -54,6 +60,13 @@ const OutlinedLabeledInputWithSelect: FC<
'& > :not(:last-child)': { '& > :not(:last-child)': {
marginRight: '.5em', marginRight: '.5em',
}, },
[`&:hover
.${muiFormControlClasses.root}
.${muiOutlinedInputClasses.root}
.${muiOutlinedInputClasses.notchedOutline}`]: {
borderColor: GREY,
},
}} }}
> >
<OutlinedInputWithLabel <OutlinedInputWithLabel

Loading…
Cancel
Save