formNumberField.stories.mdx

PHOTO EMBED

Mon Mar 25 2024 17:14:08 GMT+0000 (Coordinated Universal Time)

Saved by @rafal_rydz

import {FormNumberField} from "ui";
import {ArgsTable, Meta, Story} from "@storybook/addon-docs";

<Meta title="Components/Inputs/FormNumberField/old" component={FormNumberField}/>

export const Template = (args) => (
    <FormNumberField
        {...args}
        value={args.value && args.value !== 0 ? args.value : undefined}
    />
);

# FormNumberField

This component renders an FormNumberField.

## Props

<ArgsTable story="Default"/>

## Examples

<Story
    name="Default"
    args={{
        id: "example",
        label: "Label",
        labelIcon: "funnel",
        placeholder: "Placeholder text",
        value: undefined,
        defaultValue: undefined,
        onChange: () => {
        },
        required: true,
        minimum: 0,
        maximum: 100,
        pattern: "",
        patternText: "Did not match pattern",
        step: 0.5,
        disabled: false,
        caption: ""
    }}
>
    {Template.bind({})}
</Story>
content_copyCOPY