32 lines
755 B
TypeScript
32 lines
755 B
TypeScript
import CreateIssueModal from '@app/components/IssueModal/CreateIssueModal';
|
|
import { Transition } from '@headlessui/react';
|
|
|
|
interface IssueModalProps {
|
|
show?: boolean;
|
|
onCancel: () => void;
|
|
mediaType: 'movie' | 'tv' | 'music' | 'book';
|
|
tmdbId: number;
|
|
issueId?: never;
|
|
}
|
|
|
|
const IssueModal = ({ show, mediaType, onCancel, tmdbId }: IssueModalProps) => (
|
|
<Transition
|
|
as="div"
|
|
enter="transition-opacity duration-300"
|
|
enterFrom="opacity-0"
|
|
enterTo="opacity-100"
|
|
leave="transition-opacity duration-300"
|
|
leaveFrom="opacity-100"
|
|
leaveTo="opacity-0"
|
|
show={show}
|
|
>
|
|
<CreateIssueModal
|
|
mediaType={mediaType}
|
|
onCancel={onCancel}
|
|
tmdbId={tmdbId}
|
|
/>
|
|
</Transition>
|
|
);
|
|
|
|
export default IssueModal;
|