Skip to content

Commit 3d6bacb

Browse files
committed
feat(core): adds EditIconButton
1 parent e3810a8 commit 3d6bacb

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

react-kit/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export { LoadingSuccessButton } from './lib/components/buttons/LoadingSuccessBut
99
export { ManageButton } from './lib/components/buttons/ManageButton';
1010
export { SuccessButton } from './lib/components/buttons/SuccessButton';
1111
export { ExcelButton } from './lib/components/buttons/ExcelButton';
12+
export { EditIconButton } from './lib/components/buttons/EditIconButton';
1213

1314
// Export snackbar components
1415
export { AppSnackBar } from './lib/components/snack-bar/AppSnackBar';
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import React from 'react';
2+
import { IconButton, Tooltip } from '@mui/material';
3+
import EditIcon from '@mui/icons-material/Edit';
4+
5+
interface EditIconButtonProps {
6+
tooltipTitle: string;
7+
onClick: React.Dispatch<React.SetStateAction<boolean>>;
8+
color: 'primary';
9+
}
10+
11+
export function EditIconButton(props: EditIconButtonProps) {
12+
return (
13+
<Tooltip title={props.tooltipTitle}>
14+
<IconButton sx={{ pt: 0, pb: 0 }} color={props.color} onClick={() => props.onClick(true)} aria-label={props.tooltipTitle}>
15+
<EditIcon />
16+
</IconButton>
17+
</Tooltip>
18+
);
19+
}

0 commit comments

Comments
 (0)