File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import ArrowDropDownIcon from '@mui/icons-material/ArrowDropDown' ;
2- import { Theme , useTheme } from '@mui/material' ;
32import { MouseEvent , useState } from 'react' ;
43import { Button , Menu , MenuItem } from '../../base' ;
54import { iconXSmall } from '../../constants/iconsSizes' ;
@@ -49,7 +48,11 @@ const StyledButton = styled(Button)(() => ({
4948 padding : '0px'
5049} ) ) ;
5150
52- const StyledDiv = styled ( 'div' ) ( ( { theme, enabled } : { theme : Theme ; enabled : boolean } ) => ( {
51+ interface StyledDivProps {
52+ enabled : boolean ;
53+ }
54+
55+ const StyledDiv = styled ( 'div' ) < StyledDivProps > ( ( { theme, enabled } ) => ( {
5356 paddingLeft : '0.3rem' ,
5457 height : '1.5rem' ,
5558 width : 'auto' ,
@@ -100,15 +103,15 @@ const VisibilityChipMenu: React.FC<VisibilityChipMenuProps> = ({
100103 }
101104 close ( e ) ;
102105 } ;
103- const theme = useTheme ( ) ;
106+
104107 return (
105108 < >
106109 < StyledButton
107110 disabled = { ! enabled }
108111 onClick = { handleOpen }
109112 data-testid = { `design-visibility-${ value . toLowerCase ( ) } ` }
110113 >
111- < StyledDiv theme = { theme } enabled = { enabled } >
114+ < StyledDiv enabled = { enabled } >
112115 < span style = { { fontSize : '0.85rem' } } > { value } </ span >
113116 { enabled && < ArrowDropDownIcon style = { { ...iconXSmall } } /> }
114117 </ StyledDiv >
You can’t perform that action at this time.
0 commit comments