import React, { useState } from "react"; import ToggleContent from "."; import Button from "../button"; import TextInput from "../button"; import Text from "../text"; //import { Icons } from "../icons"; import CheckIcon from "../public/static/images/check.react.svg"; const optionsChildren = [ "button", "icon", "text", "toggleContent", "textInput", ]; export default { title: "Components/ToggleContent", component: ToggleContent, parameters: { docs: { description: { component: "ToggleContent allow you to adding information, which you may hide/show by clicking header", }, }, }, argTypes: { Children: { control: { type: "multi-select", options: optionsChildren, }, }, buttonLabel: { control: "text", }, onClickButton: { action: "button clicked!", table: { disable: true }, }, text: { control: "text" }, textInnerToggleContent: { control: "text", }, }, }; const Template = ({ buttonLabel, onClickButton, text, textInnerToggleContent, onChangeTextInput, isOpen, Children, textInputValue, ...args }) => { const [opened, setOpened] = useState(isOpen); let children = []; Children.map((item, indx) => { switch (item) { case "button": children.push(