Core/demo/DemoModal.tsx

17 lines
378 B
TypeScript
Raw Normal View History

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