import {action} from '@storybook/addon-actions';
import FileField from 'app/components/forms/fileField';
import NewBooleanField from 'sentry/components/forms/booleanField';
import CheckboxField from 'sentry/components/forms/checkboxField';
import RadioGroup from 'sentry/components/forms/controls/radioGroup';
import RangeSlider from 'sentry/components/forms/controls/rangeSlider';
import DatePickerField from 'sentry/components/forms/datePickerField';
import Form from 'sentry/components/forms/form';
import FormField from 'sentry/components/forms/formField';
import RadioBooleanField from 'sentry/components/forms/radioBooleanField';
import RadioField from 'sentry/components/forms/radioField';
import SelectField from 'sentry/components/forms/selectField';
import TextareaField from 'sentry/components/forms/textareaField';
import TextCopyInput from 'sentry/components/forms/textCopyInput';
import TextField from 'sentry/components/forms/textField';
import {Panel} from 'sentry/components/panels';
import Switch from 'sentry/components/switchButton';
export default {
title: 'Components/Forms/Fields',
};
export const _TextField = () => (
);
_TextField.storyName = 'Text';
_TextField.parameters = {
docs: {
description: {
story: 'Simple text field',
},
},
};
export const _TextareaField = ({autosize, rows}) => (
);
_TextareaField.storyName = 'Textarea';
_TextareaField.args = {
autosize: true,
rows: 1,
};
export const __BooleanField = () => (
);
__BooleanField.storyName = 'Boolean';
export const _CheckboxField = () => (
);
_CheckboxField.storyName = 'Checkbox';
export const _DatePickerField = () => (
);
_DatePickerField.storyName = 'Datepicker';
export const _RadioField = () => (
);
export const __FileField = () => (
);
__FileField.storyName = 'File';
_RadioField.storyName = 'Radio';
export const _RadioBooleanField = ({disabled}) => (
);
_RadioBooleanField.storyName = 'Radio - Boolean';
_RadioBooleanField.args = {
disabled: false,
};
export const _SelectField = () => (
);
_SelectField.storyName = 'Select';
export const SelectFieldMultiple = () => (
);
SelectFieldMultiple.storyName = 'Select - Multiple';
export const SelectFieldGrouped = () => (
);
SelectFieldGrouped.storyName = 'Select - Grouped';
export const SelectFieldInFieldLabel = () => (
);
SelectFieldInFieldLabel.storyName = 'Select - Label in Field';
SelectFieldInFieldLabel.parameters = {
docs: {
description: {
story: 'Select Control w/ Label In Field',
},
},
};
export const NonInlineField = () => (
);
NonInlineField.storyName = 'Non-inline';
NonInlineField.parameters = {
docs: {
description: {
story: 'Radio Group used w/ FormField',
},
},
};
export const _RangeSlider = () => (
{
return `${value} Toaster Strudle${value > 1 ? 's' : ''}`;
}}
/>
);
_RangeSlider.storyName = 'Range Slider';
export const WithoutAParentForm = ({onChange}) => {
return (
);
};
WithoutAParentForm.storyName = 'Without a Parent Form';
WithoutAParentForm.argTypes = {
onChange: {action: 'onChange'},
};
WithoutAParentForm.parameters = {
docs: {
description: {
story: 'New form fields used without having a parent Form',
},
},
};
export const __TextCopyInput = () => (
Value to be copied
);
__TextCopyInput.storyName = 'Text Copy';