Skip to content

Commit 954ab92

Browse files
committed
stories: add knobs for all supported props of LabelInput
1 parent cd10aa9 commit 954ab92

File tree

1 file changed

+11
-17
lines changed

1 file changed

+11
-17
lines changed

src/stories/index.stories.js

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -147,34 +147,28 @@ storiesOf('Basic', module)
147147
.add('LabelInput', () => {
148148
const disabled = boolean('Disabled', false);
149149
const value = text('Value', '');
150+
const placeholder = text('Placeholder', '');
151+
const maxBytes = number('Max Bytes (0: disabled)', 0);
152+
const vanishing = boolean('Vanishing', false);
150153
return {
151154
components: {LabelInput},
152155
data() {
153156
return {
154-
value,
155157
disabled,
158+
value,
159+
placeholder,
160+
maxBytes,
161+
vanishing,
156162
};
157163
},
158164
methods: {
159165
changed: action('changed'),
160166
input: action('input'),
167+
paste: action('paste'),
161168
},
162-
template: `<LabelInput @changed="changed" @input="input" v-model="value" :disabled="disabled"/>`,
163-
};
164-
})
165-
.add('LabelInput (restricted to 63 bytes)', () => {
166-
return {
167-
components: {LabelInput},
168-
methods: {
169-
changed: action('changed'),
170-
input: action('input'),
171-
},
172-
data() {
173-
return {
174-
value: "Standard Address"
175-
};
176-
},
177-
template: `<LabelInput :value="value" :maxBytes="63" @changed="changed" @input="input"/>`,
169+
template: `<LabelInput v-model="value"
170+
:disabled="disabled" :placeholder="placeholder" :maxBytes="maxBytes" :vanishing="vanishing"
171+
@changed="changed" @input="input" @paste="paste"/>`,
178172
};
179173
})
180174
.add('LoadingSpinner', () => {

0 commit comments

Comments
 (0)