import React, { useState } from "react"; import ModalDialog from "."; import Button from "../button"; export default { title: "Components/ModalDialog", component: ModalDialog, parameters: { docs: { description: { component: "ModalDialog is used for displaying modal dialogs", }, }, }, argTypes: { onClick: { action: "onClick" }, onClose: { action: "onClose" }, onOk: { action: "onOk", table: { disable: true } }, }, }; const Template = ({ onClick, onClose, onOk, ...args }) => { const [isVisible, setIsVisible] = useState(args.visible); const toggleVisible = (e) => { setIsVisible(!isVisible); onClick(e); }; return (
); }; export const Default = Template.bind({}); Default.args = { scale: false, displayType: "auto", zIndex: 310, headerContent: "Change password", };