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