From de67b491e47303bfabc1aff203ea6ce596d683e8 Mon Sep 17 00:00:00 2001 From: Oscar Date: Fri, 9 Oct 2020 22:41:50 +0200 Subject: [PATCH] feat(input): control input position in storybook --- packages/input/tests/input.stories.js | 28 +++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/packages/input/tests/input.stories.js b/packages/input/tests/input.stories.js index 436b287..725ad25 100644 --- a/packages/input/tests/input.stories.js +++ b/packages/input/tests/input.stories.js @@ -1,5 +1,5 @@ import TournantInput from '../src/index.vue' -import { withKnobs, text } from '@storybook/addon-knobs' +import { withKnobs, text, radios } from '@storybook/addon-knobs' // const dataNoError = { $error: false, $dirty: false } @@ -67,11 +67,35 @@ export const withError = () => ({ ` }) +const descriptionPositions = { + Top: 'top', + Bottom: 'bottom' +} + export const withDescription = () => ({ components: { TournantInput }, + props: { + descriptionPosition: { + default: radios( + 'Description position', + descriptionPositions, + 'bottom', + 'tuidescpos' + ) + } + }, data: () => ({ validation: { $error: false, $dirty: false }, password: '' }), - template: `` + template: ` + + ` })