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