diff --git a/addons/rose/addon/components/rose/form/checkbox.stories.mdx b/addons/rose/addon/components/rose/form/checkbox.stories.mdx index 5eb969565..3c342c827 100644 --- a/addons/rose/addon/components/rose/form/checkbox.stories.mdx +++ b/addons/rose/addon/components/rose/form/checkbox.stories.mdx @@ -5,7 +5,7 @@ import { text, boolean, select } from '@storybook/addon-knobs'; -# Form Checkobx +# Form Checkbox Renders a form input checkbox. diff --git a/addons/rose/addon/components/rose/form/radio/group.stories.mdx b/addons/rose/addon/components/rose/form/radio/group.stories.mdx new file mode 100644 index 000000000..af30e8246 --- /dev/null +++ b/addons/rose/addon/components/rose/form/radio/group.stories.mdx @@ -0,0 +1,62 @@ +import { Meta, Story, Preview } from '@storybook/addon-docs/blocks'; +import { hbs } from 'ember-cli-htmlbars'; +import { text } from '@storybook/addon-knobs'; + + + +# Form radiofield group + +Renders a form radiofield group. + +```htmlbars + + + + + +``` + + {{ + template: hbs` + + + + + + `, + context: { + name: text('name', 'mustagree'), + selectedValue: text('selectedValue', 'disagree'), + firstFieldLabel: text('first label', 'Agree'), + firstFieldValue: text('first value', 'agree'), + secondFieldLabel: text('second label', 'Maybe'), + secondFieldValue: text('second value', 'maybe'), + thirdFieldLabel: text('third label', 'Disagree'), + thirdFieldValue: text('third value', 'disagree'), + } + }} + diff --git a/addons/rose/addon/components/rose/form/radio/radio.stories.mdx b/addons/rose/addon/components/rose/form/radio/radio.stories.mdx new file mode 100644 index 000000000..79f2704d9 --- /dev/null +++ b/addons/rose/addon/components/rose/form/radio/radio.stories.mdx @@ -0,0 +1,46 @@ +import { Meta, Story, Preview } from '@storybook/addon-docs/blocks'; +import { hbs } from 'ember-cli-htmlbars'; +import { text, boolean } from '@storybook/addon-knobs'; + + + +# Form Radiofield + +Renders a form radiofield. + +```htmlbars + +``` + + + {{ + template: hbs` + + `, + context: { + id: text('id', 'radio-1'), + label: text('text', 'Radiofield'), + error: boolean('error', false), + value: text('value', 'value and selectedValue must match to select radiofield'), + selectedValue: text( + 'selectedValue', + 'value and selectedValue must match to select radiofield' + ), + disabled: boolean('disabled', false), + } + }} + diff --git a/addons/rose/stories/form/radio/group.stories.js b/addons/rose/stories/form/radio/group.stories.js deleted file mode 100644 index 8c64c7016..000000000 --- a/addons/rose/stories/form/radio/group.stories.js +++ /dev/null @@ -1,41 +0,0 @@ -import { hbs } from 'ember-cli-htmlbars'; -import { text } from '@storybook/addon-knobs'; - -export default { - title: 'Rose::Form::Radio::Group', -}; - -export const Normal = () => ({ - template: hbs` - - - - - - `, - context: { - name: text('name', 'Groupname'), - selectedValue: text('selectedValue', 'disagree'), - - firstFieldLabel: text('first radiofield label', 'Agree'), - firstFieldValue: text('first radiofield value', 'agree'), - - secondFieldLabel: text('second radiofield label', 'Maybe'), - secondFieldValue: text('second radiofield value', 'maybe'), - - thirdFieldLabel: text('third radiofield label', 'Disagree'), - thirdFieldValue: text('third radiofield value', 'disagree'), - }, -}); diff --git a/addons/rose/stories/form/radio/radio.stories.js b/addons/rose/stories/form/radio/radio.stories.js deleted file mode 100644 index 72bac02d3..000000000 --- a/addons/rose/stories/form/radio/radio.stories.js +++ /dev/null @@ -1,30 +0,0 @@ -import { hbs } from 'ember-cli-htmlbars'; -import { text, boolean } from '@storybook/addon-knobs'; - -export default { - title: 'Rose::Form::Radio::Radio', -}; - -export const Normal = () => ({ - template: hbs` - - `, - context: { - id: text('id', 'radio-1'), - label: text('text', 'Radiofield'), - error: boolean('error', false), - value: text('value', 'value and selectedValue must match to select radiofield'), - selectedValue: text( - 'selectedValue', - 'value and selectedValue must match to select radiofield' - ), - disabled: boolean('disabled', false), - }, -});