import _extends from "@babel/runtime/helpers/extends";
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
import React, { useState } from 'react';
import markdown from './README.mdx';
import Modal from '.';
export default {
  title: 'Components/Content Related/Modal',
  component: Modal,
  parameters: {
    componentSubtitle: 'Component',
    status: 'released',
    mdx: markdown
  }
};
export var Regular = function Regular(args) {
  var _useState = useState(args.open),
      _useState2 = _slicedToArray(_useState, 2),
      isOpen = _useState2[0],
      setOpen = _useState2[1];

  var handleModalClose = function handleModalClose() {
    setOpen(!isOpen);
  };

  return /*#__PURE__*/React.createElement(React.Fragment, null, "Use the open property in the table below to enable the preview.", ' ', /*#__PURE__*/React.createElement(Modal, _extends({}, args, {
    onRequestClose: handleModalClose,
    open: isOpen
  }), args.children));
};
Regular.args = {
  children: 'Text',
  modalLabel: 'Modal label',
  modalHeading: 'Modal heading',
  modalText: 'Modal text'
};