chore: 🤖 add @type examples

This commit is contained in:
Randall Morey committed 2020-05-04 14:40:12 -04:00
1 parent 07afe5e22c
commit ee7d4c70ab
4 files changed
+16 -4

No files matched your search

@@ -2,10 +2,11 @@ import Component from '@ember/component';
import layout from '../../../templates/components/rose/form/input';
/**
* A simple HTML `<button>` element.
* A simple HTML `<input>` element.
*
* @example
* <Rose::Form::Input
* @type="text"
* @value="Text"
* @label="Label"
* @helperText="Helper text"
@@ -23,7 +23,7 @@ $size-coefficients: (
// 4
xxxs: 0.125,
// 2
xxxxs: 0.0625 // 1,,
xxxxs: 0.0625 // 1,,,
);
/**
@@ -40,7 +40,7 @@ $font-sizes: (
// 20
h3: sizing.size(m),
// 16
button: sizing.size(m) * 0.8125 // 13,,
button: sizing.size(m) * 0.8125 // 13,,,
);
// Line height expressed as ratio.
+12 -1
View File
@@ -1,5 +1,5 @@
import { hbs } from 'ember-cli-htmlbars';
import { text, boolean } from '@storybook/addon-knobs';
import { text, boolean, select } from '@storybook/addon-knobs';
export default {
title: 'Rose::Form::Input',
@@ -8,6 +8,7 @@ export default {
export const Normal = () => ({
template: hbs`
<Rose::Form::Input
@type={{type}}
@value={{value}}
@label={{label}}
@helperText={{helperText}}
@@ -17,6 +18,16 @@ export const Normal = () => ({
/>
`,
context: {
type: select(
'type',
{
text: 'text',
email: 'email',
number: 'number',
password: 'password',
},
'text'
),
value: text('value', 'Value'),
label: text('label', 'Label'),
helperText: text('helperText', 'Helper text'),