Skip to content

Commit 5424533

Browse files
committed
fix: [FIXUP] SelectWithAction
1 parent 4b95e62 commit 5424533

File tree

1 file changed

+3
-18
lines changed

1 file changed

+3
-18
lines changed

src/inputs/SelectWithAction/SelectWithAction.js

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,6 @@ import React from 'react';
44
import PropTypes from 'prop-types';
55
import CheckIcon from '@mui/icons-material/Check';
66
import { FormControl, Select, Divider, MenuItem, ListItemText, ListItemIcon } from '@mui/material';
7-
import makeStyles from '@mui/styles/makeStyles';
8-
9-
const useStyles = makeStyles((theme) => ({
10-
selectWithAction: {
11-
width: '100%',
12-
},
13-
listItemIcon: {
14-
minWidth: '44px',
15-
},
16-
}));
177

188
export const SelectWithAction = ({
199
options,
@@ -22,10 +12,8 @@ export const SelectWithAction = ({
2212
isReadOnly = false,
2313
actions = [],
2414
}) => {
25-
const classes = useStyles();
26-
2715
return (
28-
<div className={classes.selectWithAction}>
16+
<div style={{ width: '100%' }}>
2917
<FormControl variant="outlined" fullWidth={true}>
3018
<Select
3119
data-cy="select-with-action"
@@ -51,8 +39,7 @@ export const SelectWithAction = ({
5139
<MenuItem key={option.value} value={option.value}>
5240
<ListItemIcon
5341
data-cy={`select-${option.value}-checked-icon`}
54-
className={classes.listItemIcon}
55-
style={selectedOption === option.value ? { visibility: 'visible' } : { visibility: 'hidden' }}
42+
style={{ minWidth: '44px', visibility: selectedOption === option.value ? 'visible' : 'hidden' }}
5643
>
5744
<CheckIcon color="secondary" />
5845
</ListItemIcon>
@@ -66,9 +53,7 @@ export const SelectWithAction = ({
6653
<ul>
6754
{actions.map((action) => (
6855
<MenuItem key={action.id} className={action.classes} value={action.id} onClick={action.onClick}>
69-
<ListItemIcon className={classes.listItemIcon} style={{ color: 'inherit' }}>
70-
{action.icon}
71-
</ListItemIcon>
56+
<ListItemIcon style={{ color: 'inherit', minWidth: '44px' }}>{action.icon}</ListItemIcon>
7257
<ListItemText data-cy="select-action-name" primary={action.label} />
7358
</MenuItem>
7459
))}

0 commit comments

Comments
 (0)