bigbuffet-rw/app/soapbox/features/ui/components/component_modal.tsx
marcin mikołajczak 1e74c6d3d7 TypeScript, FC, styles and fixes
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-05-28 18:03:19 +02:00

19 lines
509 B
TypeScript

import React from 'react';
import { Modal } from 'soapbox/components/ui';
interface IComponentModal {
onClose: (type?: string) => void,
component: React.ComponentType<{
onClose: (type?: string) => void,
}>,
componentProps: Record<any, any>,
}
const ComponentModal: React.FC<IComponentModal> = ({ onClose, component: Component, componentProps = {} }) => (
<Modal onClose={onClose} title=''>
<Component onClose={onClose} {...componentProps} />
</Modal>
);
export default ComponentModal;