import React, { useState } from 'react';
import {
DISPLAY,
FLEX_DIRECTION,
COLORS,
SIZES,
ALIGN_ITEMS,
} from '../../../helpers/constants/design-system';
import Box from '../../ui/box';
import { Icon, ICON_NAMES, TextField } from '..';
import { Label } from './label';
import README from './README.mdx';
export default {
title: 'Components/ComponentLibrary/Label',
id: __filename,
component: Label,
parameters: {
docs: {
page: README,
},
},
argTypes: {
htmlFor: {
control: 'text',
},
required: {
control: 'boolean',
},
disabled: {
control: 'boolean',
},
children: {
control: 'text',
},
className: {
control: 'text',
},
},
args: {
children: 'Label',
},
};
const Template = (args) => ;
export const DefaultStory = Template.bind({});
DefaultStory.storyName = 'Default';
export const Children = (args) => (
);
export const HtmlFor = (args) => {
const [value, setValue] = useState('');
const handleOnChange = (e) => {
setValue(e.target.value);
};
return (
);
};
HtmlFor.args = {
children: 'Network name',
htmlFor: 'add-network',
};
export const Required = Template.bind({});
Required.args = {
required: true,
};
export const Disabled = Template.bind({});
Disabled.args = {
disabled: true,
};