mirror of https://github.com/morpheus65535/bazarr
24 lines
580 B
TypeScript
24 lines
580 B
TypeScript
import { FunctionComponent, ReactNode } from "react";
|
|
import { Modal } from "react-bootstrap";
|
|
import { useModalData } from "./hooks";
|
|
|
|
interface StandardModalProps {
|
|
title: string;
|
|
footer?: ReactNode;
|
|
}
|
|
|
|
export const StandardModalView: FunctionComponent<StandardModalProps> = ({
|
|
children,
|
|
footer,
|
|
title,
|
|
}) => {
|
|
const { closeable } = useModalData();
|
|
return (
|
|
<>
|
|
<Modal.Header closeButton={closeable}>{title}</Modal.Header>
|
|
<Modal.Body>{children}</Modal.Body>
|
|
<Modal.Footer hidden={footer === undefined}>{footer}</Modal.Footer>
|
|
</>
|
|
);
|
|
};
|