You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
portainer/app/react/components/form-components/Input/InputLabeled.stories.tsx

37 lines
683 B

import { Meta } from '@storybook/react';
import { useState } from 'react';
import { InputLabeled } from './InputLabeled';
export default {
component: InputLabeled,
title: 'Components/Form/InputLabeled',
} as Meta;
export { TextInput, NumberInput };
function TextInput() {
const [value, setValue] = useState('');
return (
<InputLabeled
label="label"
value={value}
onChange={(e) => setValue(e.target.value)}
/>
);
}
function NumberInput() {
const [value, setValue] = useState(5);
return (
<InputLabeled
label="label"
type="number"
value={value}
onChange={(e) => setValue(e.target.valueAsNumber)}
/>
);
}