import {JaenPageProvider} from '../../internal/services/page'
import {ComponentMeta, Story} from '@storybook/react'
import React from 'react'
import Component from '.'
import {EditButton} from '../../ui/toolbar'
export default {
title: 'fields/ChoiceField',
component: Component,
decorators: [
Story => (
)
]
} as ComponentMeta
type ComponentProps = React.ComponentProps
// Create a template for the component
const Template: Story = args =>
export const Basic: Story = Template.bind({})
Basic.args = {
options: ['1x', '2x', '3x', '4x', '5x'],
defaultValue: null,
render: (selectedOption, options) => (
{selectedOption}
{options.map(option => (
- {option}
))}
),
renderPopover: (selectedOption, options, select) => (
{selectedOption}
{options.map(option => (
- select(option)}>
{option}
))}
)
}