build(#10336): finalize
This commit is contained in:
parent
38b153ca94
commit
1521bb088c
18 changed files with 581 additions and 30 deletions
|
|
@ -0,0 +1,93 @@
|
|||
/* eslint-disable @typescript-eslint/explicit-function-return-type */
|
||||
import { StoryObj } from '@storybook/vue3';
|
||||
import MkPageHeader from './MkPageHeader.vue';
|
||||
export const Empty = {
|
||||
render(args) {
|
||||
return {
|
||||
components: {
|
||||
MkPageHeader,
|
||||
},
|
||||
setup() {
|
||||
return {
|
||||
args,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
props() {
|
||||
return {
|
||||
...args,
|
||||
};
|
||||
},
|
||||
},
|
||||
template: '<MkPageHeader v-bind="props" />',
|
||||
};
|
||||
},
|
||||
args: {
|
||||
tabs: [],
|
||||
},
|
||||
parameters: {
|
||||
layout: 'centered',
|
||||
},
|
||||
} satisfies StoryObj<typeof MkPageHeader>;
|
||||
export const OneTab = {
|
||||
...Empty,
|
||||
args: {
|
||||
...Empty.args,
|
||||
tab: 'sometabkey',
|
||||
tabs: [
|
||||
{
|
||||
key: 'sometabkey',
|
||||
title: 'Some Tab Title',
|
||||
},
|
||||
],
|
||||
},
|
||||
} satisfies StoryObj<typeof MkPageHeader>;
|
||||
export const Icon = {
|
||||
...OneTab,
|
||||
args: {
|
||||
...OneTab.args,
|
||||
tabs: [
|
||||
{
|
||||
...OneTab.args.tabs[0],
|
||||
icon: 'ti ti-home',
|
||||
},
|
||||
],
|
||||
},
|
||||
} satisfies StoryObj<typeof MkPageHeader>;
|
||||
export const IconOnly = {
|
||||
...Icon,
|
||||
args: {
|
||||
...Icon.args,
|
||||
tabs: [
|
||||
{
|
||||
...Icon.args.tabs[0],
|
||||
title: undefined,
|
||||
iconOnly: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
} satisfies StoryObj<typeof MkPageHeader>;
|
||||
export const SomeTabs = {
|
||||
...Empty,
|
||||
args: {
|
||||
...Empty.args,
|
||||
tab: 'princess',
|
||||
tabs: [
|
||||
{
|
||||
key: 'princess',
|
||||
title: 'Princess',
|
||||
icon: 'ti ti-crown',
|
||||
},
|
||||
{
|
||||
key: 'fairy',
|
||||
title: 'Fairy',
|
||||
icon: 'ti ti-snowflake',
|
||||
},
|
||||
{
|
||||
key: 'angel',
|
||||
title: 'Angel',
|
||||
icon: 'ti ti-feather',
|
||||
},
|
||||
],
|
||||
},
|
||||
} satisfies StoryObj<typeof MkPageHeader>;
|
||||
Loading…
Add table
Add a link
Reference in a new issue