import { generateModal } from "@react-crates/modal";
export const { DynamicModal } = generateModal();
function Example() {
return (
<div>
<DynamicModal
duration={250}
position="center"
action={(confirm?: boolean | string) => {
...
return;
}}
>
{}
<DynamicModal.Trigger>confirm</DynamicModal.Trigger>
{}
<DynamicModal.Element>
<div>
<h2>타이틀</h2>
<p>내용</p>
<DynamicModal.Action.Cancel>취소</DynamicModal.Action.Cancel>
<DynamicModal.Action.Confirm>확인</DynamicModal.Action.Confirm>
</div>
</DynamicModal.Element>
</DynamicModal>
</div>
);
}