diff --git a/src/components/Input/VuInput.stories.ts b/src/components/Input/VuInput.stories.ts new file mode 100644 index 0000000..6515e69 --- /dev/null +++ b/src/components/Input/VuInput.stories.ts @@ -0,0 +1,31 @@ +import { Meta, StoryObj } from '@storybook/vue3-vite'; +import VuInput from './VuInput.vue'; + +const meta = { + title: 'Viribus Unitis/VuInput', + component: VuInput, + tags: ['autodocs'], + args: { + message: 'Номер группы', + variant: 'outlined', + }, +} satisfies Meta; + +export default meta; + +type Story = StoryObj; + +export const Default: Story = {}; + +export const WithPlaceholder: Story = { + args: { + placeholder: "Введите номер группы", + autofocus: true + }, +}; + +export const Validate: Story = { + args: { + rules: [(value: string) => !!value || 'Обязательное поле'] + }, +}; \ No newline at end of file diff --git a/src/components/Input/VuInput.vue b/src/components/Input/VuInput.vue new file mode 100644 index 0000000..0cb13ee --- /dev/null +++ b/src/components/Input/VuInput.vue @@ -0,0 +1,45 @@ + + + \ No newline at end of file