import { Meta } from '@storybook/react';
import { useState } from 'react';
import { InputGroup } from '.';
export default {
component: InputGroup,
title: 'Components/Form/InputGroup',
} as Meta;
export { BasicExample, Addons, Sizing };
function BasicExample() {
const [value1, setValue1] = useState('');
const [valueNumber, setValueNumber] = useState(0);
return (
@
setValue1(e.target.value)}
placeholder="Username"
aria-describedby="basic-addon1"
/>
setValue1(e.target.value)}
placeholder="Recipient's username"
aria-describedby="basic-addon2"
/>
@example.com
$
setValueNumber(parseInt(e.target.value, 10))}
aria-label="Amount (to the nearest dollar)"
/>
.00
https://example.com/users/
setValue1(e.target.value)}
id="basic-url"
aria-describedby="basic-addon3"
/>
);
}
function Addons() {
const [value1, setValue1] = useState('');
const [value2, setValue2] = useState('');
return (
);
}
function Sizing() {
const [value, setValue] = useState('');
return (
Small
setValue(e.target.value)}
/>
Default
setValue(e.target.value)}
/>
Large
setValue(e.target.value)}
/>
);
}