insomnia/packages/insomnia-components/components/radio-button-group.stories.js

24 lines
629 B
JavaScript
Raw Normal View History

2020-04-26 20:33:39 +00:00
// @flow
import * as React from 'react';
import RadioButtonGroup from './radio-button-group';
export default { title: 'Navigation | Radio Button Group' };
2020-04-26 20:33:39 +00:00
export const _default = () => {
const [selectedValue, setSelectedValue] = React.useState('scratch');
return (
<RadioButtonGroup
name="dummy"
onChange={setSelectedValue}
choices={[
{ label: 'From Scratch', value: 'scratch' },
{ label: 'From Repository', value: 'repo' },
{ label: 'From Clipboard', value: 'clip' },
{ label: 'From Spec', value: 'spec' },
]}
selectedValue={selectedValue}
/>
);
};