bigbuffet-rw/app/soapbox/features/ui/components/modals/component-modal.tsx
marcin mikołajczak 81de0014d3 Change ESLint rules, lint
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2023-02-16 00:12:02 +01:00

19 lines
505 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;