@wonderflow/react-components
Version:
UI components from Wonderflow's Wanda design system
22 lines (21 loc) • 1.34 kB
JavaScript
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Button, Select, Stack, Textfield, } from '../..';
import { InputGroup } from './input-group';
const story = {
title: 'Inputs/Input group',
component: InputGroup,
args: {
label: 'Label',
dimension: 'regular',
input: _jsx(Textfield, { type: "text", defaultValue: "sample" }),
},
argTypes: {
dimension: {
options: ['small', 'regular', 'big'],
control: { type: 'radio' },
},
},
};
export default story;
const Default = args => (_jsxs(Stack, { inline: true, fill: false, hAlign: "start", rowGap: 32, children: [_jsx(InputGroup, { suffix: _jsx(Button, { children: "Confirm" }), ...args }), _jsx(InputGroup, { suffix: _jsx(Textfield, { disabled: true, size: 9, placeholder: "@mail.com" }), ...args }), _jsx(InputGroup, { label: "Sample label", prefix: _jsx(Textfield, { readOnly: true, size: 6, defaultValue: "https://" }), suffix: (_jsxs(Select, { defaultValue: 1, children: [_jsx("option", { value: "1", children: ".com" }), _jsx("option", { value: "2", children: ".it" }), _jsx("option", { value: "3", children: ".org" }), _jsx("option", { value: "4", children: ".dev" }), _jsx("option", { value: "5", children: ".io" })] })), ...args })] }));
export const Single = Default.bind({});