Core/demo/DemoModal.tsx

19 lines
465 B
TypeScript

import React from "react";
import {Modal, useModal} from "../src/Components/Modals/Modals";
import {ModalType} from "../src/Components/Modals/ModalsTypes";
import {Buttons} from "../src/Components/Buttons/Buttons";
export function DemoModal({type}: { type: ModalType; })
{
const {close} = useModal();
return (
<Modal type={type} title={"Modal title"}>
Modal test content
<Buttons>
<button onClick={close}>OK</button>
</Buttons>
</Modal>
);
}