fleet/frontend/components/forms/fields/InputFieldWithIcon/InputFieldWithIcon.stories.tsx
Gabriel Hernandez 8168ff3655
update storybook to 8.4.7 (#25451)
For #25349

This updates storybook and its addons to 8.4.7. This is done to remove
the transitive dependency on path-to-regexp,
which is no longer used in this version of storybook.

This will fix the original vulnerability issue for `path-to-regexp`
2025-01-20 16:17:33 +00:00

124 lines
2.4 KiB
TypeScript

import { Meta, StoryObj } from "@storybook/react";
import { noop } from "lodash";
// @ts-ignore
import InputFieldWithIcon from ".";
import "../../../../index.scss";
const meta: Meta<typeof InputFieldWithIcon> = {
component: InputFieldWithIcon,
title: "Components/FormFields/InputWithIcon",
argTypes: {
iconPosition: {
options: ["start", "end"],
control: "radio",
},
iconName: {
options: [
"chevrondown",
"chevronleft",
"chevronright",
"chevronup",
"cpu",
"downcaret",
"filter",
"mac",
"memory",
"storage",
"upcaret",
"uptime",
"world",
"osquery",
"join",
"add-button",
"packs",
"help",
"admin",
"config",
"success-check",
"offline",
"windows-original",
"centos-original",
"ubuntu-original",
"apple-original",
"search",
"all-hosts",
"alerts",
"logout",
"account",
"clipboard",
"list-select",
"grid-select",
"label",
"docker",
"cloud",
"self-hosted",
"help-solid",
"help-stroke",
"warning-filled",
"delete-cloud",
"pdf",
"credit-card-small",
"billing-card",
"lock-big",
"link-big",
"briefcase",
"name-card",
"business",
"clock",
"host-large",
"single-host",
"username",
"password",
"email",
"hosts",
"query",
"import",
"pencil",
"add-plus",
"x",
"right-arrow",
"camera",
"plus-minus",
"bold-plus",
"linux-original",
"clock2",
"trash",
"laptop-plus",
"wrench-hand",
"external-link",
"fullscreen",
"windowed",
"heroku",
"ubuntu",
"windows",
"centos",
"apple",
"linux",
],
control: "select",
},
},
args: {
autofocus: false,
iconPosition: "start",
iconName: "email",
disabled: false,
label: "Email",
placeholder: "Type here...",
error: "",
helpText: "",
name: "",
tabIndex: "",
type: "",
className: "",
onChange: noop,
},
};
export default meta;
type Story = StoryObj<typeof InputFieldWithIcon>;
export const Default: Story = {};