/* eslint-disable react/no-unstable-nested-components */ /* eslint-disable react/no-unescaped-entities */ import React from "react"; // import { BooleanValue, StringValue } from "react-values"; import moment from "moment"; import SettingsReactSvg from "PUBLIC_DIR/images/settings.react.svg"; import CatalogFolderReactSvg from "PUBLIC_DIR/images/catalog.folder.react.svg"; import CatalogEmployeeReactSvgUrl from "PUBLIC_DIR/images/catalog.employee.react.svg?url"; import ItemActiveReactSvgUrl from "PUBLIC_DIR/images/item.active.react.svg?url"; import { Avatar, AvatarRole, AvatarSize } from "../avatar"; import { Button, ButtonSize } 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, ComboBoxSize } from "../combobox"; import { InputBlock } from "../input-block"; import { RadioButtonGroup } from "../radio-button-group"; import { InputSize, InputType, 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, HeadingSize } from "../heading"; import { Link, LinkType } from "../link"; import { Loader, LoaderTypes } from "../loader"; import { Row } from "../row"; import { Scrollbar } from "../scrollbar"; import { TabsContainer } from "../tabs-container"; import { Text } from "../text"; import { Toast, toastr } from "../toast"; import { ToggleContent } from "../toggle-content"; import { Tooltip } from "../tooltip"; const ArrayItems = [ { 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: CatalogEmployeeReactSvgUrl, // optional item label: "Option 1", disabled: false, // optional item onClick: () => {}, // optional item }, { key: 1, icon: CatalogEmployeeReactSvgUrl, // optional item label: "Option 2", disabled: false, // optional item onClick: () => {}, // optional item }, { key: 2, icon: CatalogEmployeeReactSvgUrl, // optional item label: "Option 3", disabled: true, // optional item onClick: () => {}, // optional item }, { key: 3, icon: CatalogEmployeeReactSvgUrl, // 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 = ( {}} selectedOption={{ key: 0, icon: ItemActiveReactSvgUrl, label: "", }} scaled={false} size={ComboBoxSize.content} isDisabled={false} /> ); const checkedProps = { checked: false }; const getElementProps = (e: string) => e === "Avatar" ? { element: elementAvatar } : e === "Icon" ? { element: elementIcon } : e === "ComboBox" ? { element: elementComboBox } : {}; const elementProps = getElementProps(element); const rowContent = ( {}} contextOptions={[ { key: "key1", label: "Edit", onClick: () => {}, }, { key: "key2", label: "Delete", onClick: () => {}, }, ]} > Sample text ); let rowCount = 5; const rowArray: React.ReactElement[] = []; while (rowCount !== 0) { rowArray.push(rowContent); rowCount -= 1; } export default { title: "All", parameters: { docs: { description: { component: "All components" } }, }, }; const Template = () => (
Heading text
Text as "p"
Black page link
Black hovered page link
Black action link
Black hovered action link
Bob
John
Kevin content ? (
{arrayUsers[+content].name} {arrayUsers[+content].email} {arrayUsers[+content].position}
) : null } />
{/*
[ { key: "key", label: "label", onClick: () => {} } ]} />
*/} {/*
{}} iconName={VerticalDotsReactSvgUrl} isFill isClickable={false} />
*/}
{}} />
{/* {({ value, set }: any) => ( */} {}} type={InputType.text} size={InputSize.base} /> {/* )} */} {/* */}
{/* {({ value, set }: any) => ( */} {}} onChange={() => {}} value="" type={InputType.text} size={InputSize.base} > {/* )} */}
{/*
{ 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" setSelectedDate={(date) => { console.log("Selected date", date); }} />
*/}
{/* {({ value, set }: any) => ( */}