Core/demo/DemoModal.tsx

20 lines
465 B
TypeScript
Raw Permalink Normal View History

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>
);
}