diff --git a/components/src/stories/Textarea.stories.js b/components/src/stories/Textarea.stories.js index 14e38094..3fed6c32 100644 --- a/components/src/stories/Textarea.stories.js +++ b/components/src/stories/Textarea.stories.js @@ -9,13 +9,31 @@ export const Basic = { setup() { return { args }; }, - template: '', + template: '', }), args: { + label: 'Simple textarea', + hint: 'This is a hint for the text area input', value: '', placeholder: 'Placeholder text', - label: 'Label', + }, +}; + +export const Validation = { + name: 'Input validation', + render: Basic.render, + + args: { + label: 'Text area with validation', + hint: 'This is a text area with validation. The text should be < 30 characters.', + value: '', + placeholder: 'Lorem ipsum dolor sit amet', + required: true, + rules: [ + (value) => !!value || 'This field is required', + (value) => value.length < 30 || 'The value must be less than 30 characters', + ], }, }; @@ -28,10 +46,12 @@ export default { argTypes: { value: 'text', readonly: 'boolean', + hint: 'text', placeholder: 'text', required: 'boolean', autoGrow: 'boolean', noBorder: 'boolean', + monospace: 'boolean', rows: 'number', label: 'string', }, diff --git a/components/src/widgets/menu/widget.vue b/components/src/widgets/menu/widget.vue index 9e58d2fb..69063d7a 100644 --- a/components/src/widgets/menu/widget.vue +++ b/components/src/widgets/menu/widget.vue @@ -91,7 +91,7 @@ onUnmounted(() => { .menu-content { position: absolute; - top: 0; + top: 2px; width: max-content; &_align-right { diff --git a/components/src/widgets/textarea/widget.vue b/components/src/widgets/textarea/widget.vue index 6b804bd7..edcbc525 100644 --- a/components/src/widgets/textarea/widget.vue +++ b/components/src/widgets/textarea/widget.vue @@ -8,7 +8,7 @@