export type Props = { readonly flexFooter?: boolean; readonly okButtonText?: string; readonly okButtonType?: string; readonly cancelButtonText?: string; readonly cancelButtonType?: string; readonly children?: React.ReactNode; }; type InternalProps = { readonly showCancelButton: boolean; onConfirm?: () => void; onDismiss?: () => void; }; const ModalFooter: React.FC = props => { const classes = ['modal-footer']; if (props.flexFooter) { classes.push('d-flex', 'justify-content-between'); } const footerClass = classes.join(' '); return props.children ?
{props.children}
: (
{props.showCancelButton && ( )}
); }; export default ModalFooter;