UNPKG

@mozaic-ds/vue

Version:

Mozaic-Vue is the Vue.js implementation of ADEO Design system

76 lines (66 loc) 1.72 kB
import type { Meta, StoryObj } from '@storybook/vue3-vite'; import { action } from 'storybook/actions'; import MTag from './MTag.vue'; const meta: Meta<typeof MTag> = { title: 'Indicators/Tag', component: MTag, parameters: { docs: { description: { component: 'A Status dot is a small visual indicator used to represent the state or condition of an element. It is often color-coded to convey different statuses at a glance, such as availability, activity, or urgency. Status Dots are commonly found in user presence indicators, system statuses, or process tracking to provide quick, unobtrusive feedback.', }, }, }, args: { label: 'Tag label', }, render: (args) => ({ components: { MTag }, setup() { const handleUpdate = action('update:modelValue'); const handleRemoveTag = action('remove-tag'); return { args, handleUpdate, handleRemoveTag }; }, template: ` <MTag v-bind="args" @update:modelValue="handleUpdate" @remove-tag="handleRemoveTag" ></MTag> `, }), }; export default meta; type Story = StoryObj<typeof MTag>; export const Default: Story = {}; export const Size: Story = { args: { size: 's' }, }; export const Interactive: Story = { args: { type: 'interactive' }, }; export const Disabled: Story = { args: { type: 'interactive', disabled: true, }, }; export const Contextualised: Story = { args: { type: 'contextualised', contextualisedNumber: 99, }, }; export const Removable: Story = { args: { type: 'removable', id: 'tagId', }, }; export const Selectable: Story = { args: { type: 'selectable', modelValue: true, }, };