UNPKG

@scrumble-nl/react-quick-modal

Version:

A quick and easy wrapper around react-bootstrap modal, you can add or remove a modal from anywhere in your application with a few simple steps.

19 lines (18 loc) 808 B
import React, { PropsWithChildren } from 'react'; type buttonType = 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'dark' | 'light' | 'link' | 'outline-primary' | 'outline-secondary' | 'outline-success' | 'outline-danger' | 'outline-warning' | 'outline-info' | 'outline-dark' | 'outline-light'; type modalButton = { label?: string; callback?(): void; variant?: buttonType; }; type props = PropsWithChildren<{ title: string; cancelButton?: modalButton; confirmButton?: modalButton; size?: 'sm' | 'lg' | 'xl'; className?: string; closeOnConfirm?: boolean; keyboard?: boolean; }>; declare const Modal: ({ cancelButton, confirmButton, className, size, keyboard, title, children, closeOnConfirm, }: props) => React.JSX.Element; export default Modal;