@ciceksepeti/cui-dialog
v0.11.6
Published
ÇiçekSepeti Accessible Dialog Component
Downloads
97
Readme
@ciceksepeti/cui-dialog
Inform users about a task and can contain critical information, require decisions. A Dialog is a type of modal window that appears in front of app content to provide critical information or ask for a decision.
Installing
Using Npm:
$ npm install @ciceksepeti/cui-dialog
Using Yarn:
$ yarn add @ciceksepeti/cui-dialog
Example
import React, { useState } from "react";
import Dialog from "@ciceksepeti/cui-dialog";
import '@ciceksepeti/cui-dialog/styles.css";
function Demo() {
const [open, setOpen] = useState(false);
return (
<Dialog open={open}>
<p>I am a dialog content</p>
<button onClick={() => setOpen(false)}>Close</button>
</Dialog>
);
}