import React, { useState } from "react";
import { Button } from "../button/Button";
import { Modal } from "../modal/Modal";
export const ModalExample = ({ closeText, buttonText, }) => {
    const [isOpen, setIsOpen] = useState(false);
    const toggle = () => setIsOpen(!isOpen);
    return (React.createElement(React.Fragment, null,
        React.createElement(Button, { size: "small", primary: true, onClick: toggle, label: buttonText }),
        React.createElement(Modal, { isOpen: isOpen, toggle: toggle, closeText: closeText },
            React.createElement("p", null, "This is the content."))));
};
