@mozaic-ds/vue
Version:
Mozaic-Vue is the Vue.js implementation of ADEO Design system
105 lines (96 loc) • 2.2 kB
text/typescript
import type { Meta, StoryObj } from '@storybook/vue3-vite';
import { action } from 'storybook/actions';
import Mtabs from './MTabs.vue';
import ChevronRight24 from '@mozaic-ds/icons-vue/src/components/ChevronRight24/ChevronRight24.vue';
const meta: Meta<typeof Mtabs> = {
title: 'Navigation/Tabs',
component: Mtabs,
parameters: {
docs: {
description: {
component:
'Tabs are a navigation component that allows users to switch between different sections within the same context. They help organize content efficiently by displaying only one section at a time, reducing clutter and improving accessibility. Tabs can include icons, labels, and notification badges to provide additional context. They are commonly used in dashboards, product management, and settings interfaces.',
},
},
},
args: {
tabs: [
{
label: 'Label',
},
{
label: 'Label',
},
{
label: 'Label',
},
{
label: 'Label',
},
],
},
render: (args) => ({
components: { Mtabs, ChevronRight24 },
setup() {
const handleUpdate = action('update:modelValue');
return { args, handleUpdate };
},
template: `
<Mtabs
v-bind="args"
@update:modelValue="handleUpdate"
></Mtabs>
`,
}),
};
export default meta;
type Story = StoryObj<typeof Mtabs>;
export const Default: Story = {};
export const Icons: Story = {
args: {
tabs: [
{
label: 'Label',
icon: ChevronRight24,
},
{
label: 'Label',
icon: ChevronRight24,
},
{
label: 'Label',
icon: ChevronRight24,
},
{
label: 'Label',
icon: ChevronRight24,
},
],
},
};
export const Centered: Story = {
args: { centered: true },
};
export const NoDivider: Story = {
args: { divider: false },
};
export const Disabled: Story = {
args: {
tabs: [
{
label: 'Label',
},
{
label: 'Label',
},
{
label: 'Label',
disabled: true,
},
{
label: 'Label',
disabled: true,
},
],
},
};