Skip to content

Commit 434211c

Browse files
committed
fix(EditIconButton): fixes type issue
1 parent 5386547 commit 434211c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

react-kit/src/lib/components/buttons/EditIconButton.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,17 @@ import EditIcon from '@mui/icons-material/Edit';
55
interface EditIconButtonProps {
66
tooltipTitle: string;
77
onClick: React.Dispatch<React.SetStateAction<boolean>>;
8-
color: 'primary';
8+
color?: 'inherit' | 'default' | 'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning';
99
}
1010

1111
export function EditIconButton(props: EditIconButtonProps) {
1212
return (
1313
<Tooltip title={props.tooltipTitle}>
14-
<IconButton sx={{ pt: 0, pb: 0 }} color={props.color} onClick={() => props.onClick(true)} aria-label={props.tooltipTitle}>
14+
<IconButton
15+
sx={{ pt: 0, pb: 0 }}
16+
color={props.color ?? 'primary'}
17+
onClick={() => props.onClick(true)}
18+
aria-label={props.tooltipTitle}>
1519
<EditIcon />
1620
</IconButton>
1721
</Tooltip>

0 commit comments

Comments
 (0)