updated messageDialog

This commit is contained in:
Abhinav-grd 2021-04-05 17:40:32 +05:30
parent 28bfffc8cc
commit d3aaca4c82

View file

@ -3,12 +3,12 @@ import { Button, Modal } from 'react-bootstrap';
interface Props {
show: boolean;
children;
children?: any;
onHide: () => void;
attributes: {
title: string;
close: { text: string; action: any };
proceed: { text: string; action: any };
attributes?: {
title?: string;
close?: { text: string };
proceed?: { text: string; action: any };
};
}
export function MessageDialog({ attributes, children, ...props }: Props) {
@ -25,7 +25,7 @@ export function MessageDialog({ attributes, children, ...props }: Props) {
</Modal.Body>
<Modal.Footer style={{ borderTop: 'none' }}>
{attributes.close && (
<Button variant="danger" onClick={attributes.close.action}>
<Button variant="danger" onClick={props.onHide}>
{attributes.close.text}
</Button>
)}