From 792cfe7688e052aec6466d67e29f69cee77f378b Mon Sep 17 00:00:00 2001 From: Daniel Kostro Date: Wed, 28 Sep 2022 14:11:36 +0200 Subject: [PATCH] feat: add width and height props to ConfirmModal --- src/components/ConfirmModal.tsx | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/components/ConfirmModal.tsx b/src/components/ConfirmModal.tsx index a6ecd2a6..d8443b61 100644 --- a/src/components/ConfirmModal.tsx +++ b/src/components/ConfirmModal.tsx @@ -5,18 +5,23 @@ import { Button } from '.'; interface ConfirmModalProps { children: ReactNode; isOpen: boolean; - onConfirm: () => void; onCancel: () => void; - saveText?: string; cancelText?: string; - headerColor: string; + width?: number; + height?: number; } export function ConfirmModal(props: ConfirmModalProps) { - const { saveText = 'Save', cancelText = 'Cancel', headerColor } = props; + const { + saveText = 'Save', + cancelText = 'Cancel', + headerColor, + width, + height, + } = props; if (!props.isOpen) { return null; @@ -37,8 +42,8 @@ export function ConfirmModal(props: ConfirmModalProps) {