import { Story, 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: Story = args => (
);
export const Default = Template.bind({});
export const ErrorWithMessages = Template.bind({});
ErrorWithMessages.args = {
required: true,
errors: ["Please enter a value.", "Value must not be empty."],
inputLabel: "Require Field",
appearance: InputAppearance.Error
};
export const WithDefaultIconLongStringTooltip = args => (
);
export const WithDefaultIconHtmlElementTooltip = args => (
Tooltip containing HTML element}
{...args}
/>
);