/* eslint-disable react/no-unescaped-entities */ import React from "react"; import { BooleanValue, StringValue } from "react-values"; import Avatar from "../avatar"; import Button from "../button"; //import HelpButton from "../help-button"; //import IconButton from "../icon-button"; import ToggleButton from "../toggle-button"; import Calendar from "../calendar"; import Checkbox from "../checkbox"; import ComboBox from "../combobox"; import InputBlock from "../input-block"; import RadioButtonGroup from "../radio-button-group"; import TextInput from "../text-input"; import Textarea from "../textarea"; //import ContextMenuButton from "../context-menu-button"; import DatePicker from "../date-picker"; import FieldContainer from "../field-container"; import Heading from "../heading"; import Link from "../link"; import Loader from "../loader"; import Row from "../row"; import Scrollbar from "../scrollbar"; import TabContainer from "../tabs-container"; import Text from "../text"; import Toast from "../toast"; import toastr from "../toast/toastr"; import ToggleContent from "../toggle-content"; import Tooltip from "../tooltip"; import SettingsIcon from "../public/static/images/settings.react.svg"; import CatalogFolderIcon from "../public/static/images/catalog.folder.react.svg"; const array_items = [ { key: "0", title: "Tab 1", content:
Tab 1 content
, }, { key: "1", title: "Tab 2", content:
Tab 2 content
, }, { key: "2", title: "Tab 3", content:
Tab 3 content
, }, ]; const options = [ { key: 0, icon: "static/images/catalog.employee.react.svg", // optional item label: "Option 1", disabled: false, // optional item onClick: () => {}, // optional item }, { key: 1, icon: "static/images/catalog.employee.react.svg", // optional item label: "Option 2", disabled: false, // optional item onClick: () => {}, // optional item }, { key: 2, icon: "static/images/catalog.employee.react.svg", // optional item label: "Option 3", disabled: true, // optional item onClick: () => {}, // optional item }, { key: 3, icon: "static/images/catalog.employee.react.svg", // optional item label: "Option 4", disabled: false, // optional item onClick: () => {}, // optional item }, ]; const arrayUsers = [ { key: "user_1", name: "Bob", email: "Bob@gmail.com", position: "developer" }, { key: "user_2", name: "John", email: "John@gmail.com", position: "developer", }, { key: "user_3", name: "Kevin", email: "Kevin@gmail.com", position: "developer", }, ]; const element = "Icon"; const elementAvatar = ; const elementIcon = ; const elementComboBox = ( console.log(option)} selectedOption={{ key: 0, icon: "static/images/item.active.react.svg", label: "", }} scaled={false} size="content" isDisabled={false} /> ); const checkedProps = { checked: false }; const getElementProps = (element) => element === "Avatar" ? { element: elementAvatar } : element === "Icon" ? { element: elementIcon } : element === "ComboBox" ? { element: elementComboBox } : {}; const elementProps = getElementProps(element); const rowContent = ( <> console.log("Context action: Edit"), }, { key: "key2", label: "Delete", onClick: () => console.log("Context action: Delete"), }, ]} > Sample text ); let rowCount = 5; const rowArray = []; while (rowCount != 0) { rowArray.push(rowContent); rowCount--; } export default { title: "Components/All", parameters: { docs: { description: { component: "All components" } }, }, }; const Template = (args) => ( <>
Heading text
Text as "p"
Black page link
Black hovered page link
Black action link
Black hovered action link
Bob
John
Kevin dataTip ? (
{arrayUsers[dataTip].name} {arrayUsers[dataTip].email} {arrayUsers[dataTip].position}
) : null } />
{/*
[ { key: "key", label: "label", onClick: () => {} } ]} />
*/} {/*
{}} iconName={"search.react.svg"} isFill={true} isClickable={false} />
*/}
console.log("selected", option)} />
{({ value, set }) => ( set(e.target.value)} /> )}
{({ value, set }) => ( {}} onChange={(e) => set(e.target.value)} value={value} > )}
{ console.log("Selected date", date); }} selectedDate={new Date()} minDate={new Date("1970/01/01")} maxDate={new Date(new Date().getFullYear() + 1 + "/01/01")} isDisabled={false} isReadOnly={false} hasError={false} isOpen={false} themeColor="#ED7309" locale="en" />
{({ value, set }) => (