17 lines
378 B
TypeScript
17 lines
378 B
TypeScript
|
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>
|
||
|
);
|
||
|
}
|