mirror of
https://github.com/Nezumi-2711/react-training.git
synced 2026-09-23 04:19:48 +00:00
Update components and constants folder
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
import { memo } from 'react';
|
||||
|
||||
// Styled
|
||||
import { StyledConfirmDelete } from './styled';
|
||||
|
||||
// Component
|
||||
import Button from '@commonStyle/Button';
|
||||
|
||||
interface IConfirmMessage {
|
||||
message: string;
|
||||
disabled: boolean;
|
||||
onConfirm: () => void;
|
||||
onCloseModal?: () => void;
|
||||
}
|
||||
|
||||
const ConfirmMessage = memo(
|
||||
({ message, disabled, onConfirm, onCloseModal }: IConfirmMessage) => {
|
||||
return (
|
||||
<StyledConfirmDelete>
|
||||
<p>{message}</p>
|
||||
|
||||
<div>
|
||||
<Button variations="danger" disabled={disabled} onClick={onConfirm}>
|
||||
Delete
|
||||
</Button>
|
||||
<Button
|
||||
variations="secondary"
|
||||
disabled={disabled}
|
||||
onClick={onCloseModal}
|
||||
>
|
||||
Cancel
|
||||
</Button>
|
||||
</div>
|
||||
</StyledConfirmDelete>
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
export default ConfirmMessage;
|
||||
Reference in New Issue
Block a user