import { StoryFn, Meta } from "@storybook/react";
import * as React from "react";
import { InputStoryWrapper } from "../../../decorators/inputStoryWrapper";
import { TextInput } from "..";
import { InputAppearance } from "../../shared/types/inputAppearance";
export default {
title: "Forms/TextInput",
decorators: [Story => {Story()}],
component: TextInput,
argTypes: {
inputLabel: {
control: {
type: "text"
}
},
hintContent: {
control: {
type: "text"
}
},
errors: {
control: { disable: true }
}
},
args: {
inputLabel: "Default Input Label"
}
} as Meta;
const Template: StoryFn = args => (
);
export const Default = {
render: Template
};
export const ErrorWithMessages = {
render: Template,
args: {
required: true,
errors: ["Please enter a value.", "Value must not be empty."],
inputLabel: "Require Field",
appearance: InputAppearance.Error
}
};
export const WithDefaultIconLongStringTooltip = {
render: args => (
)
};
export const WithDefaultIconHtmlElementTooltip = {
render: args => (
Tooltip containing HTML element}
{...args}
/>
)
};