mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-05-07 01:02:36 +00:00
chore: restructure project into yarn workspaces, remove next
This commit is contained in:
parent
49e308507e
commit
8d06327c03
266 changed files with 16466 additions and 3350 deletions
|
@ -0,0 +1,33 @@
|
|||
import * as React from 'react';
|
||||
import { HorizontalSwitch } from './HorizontalSwitch';
|
||||
|
||||
export default {
|
||||
title: 'Atoms/Horizontal Switch',
|
||||
component: HorizontalSwitch,
|
||||
args: {
|
||||
items: ['true', 'false'],
|
||||
value: 'true',
|
||||
},
|
||||
};
|
||||
|
||||
const Story = (args) => {
|
||||
const [value, setValue] = React.useState(args.value);
|
||||
|
||||
return (
|
||||
<HorizontalSwitch
|
||||
{...args}
|
||||
value={value}
|
||||
onChange={(a) => {
|
||||
setValue(a);
|
||||
args.onChange(a);
|
||||
}}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export const Switch = Story.bind({});
|
||||
export const SwitchThree = Story.bind({});
|
||||
SwitchThree.args = {
|
||||
items: ['aaa', 'bbb', 'ccc'],
|
||||
value: 'aaa',
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue