Merge pull request #10 from hashicorp/chore-input-field-component
chore: 🤖 build out input/text field component - ICU-62
This commit is contained in:
2 files changed
+13
-1
No files matched your search
@@ -6,6 +6,7 @@ import layout from '../../../templates/components/rose/form/input';
|
||||
*
|
||||
* @example
|
||||
* <Rose::Form::Input
|
||||
* @type="text"
|
||||
* @value="Text"
|
||||
* @label="Label"
|
||||
* @helperText="Helper text"
|
||||
|
||||
@@ -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'),
|
||||
|
||||
Reference in new issue
Block a user