/* eslint-disable @typescript-eslint/explicit-function-return-type */
import { waitFor } from '@storybook/testing-library';
import { StoryObj } from '@storybook/vue3';
import MkPageHeader from './MkPageHeader.vue';
export const Empty = {
render(args) {
return {
components: {
MkPageHeader,
},
setup() {
args,
};
computed: {
props() {
...this.args,
template: '<MkPageHeader v-bind="props" />',
async play() {
const wait = new Promise((resolve) => setTimeout(resolve, 800));
await waitFor(async () => await wait);
args: {
static: true,
tabs: [],
parameters: {
layout: 'centered',
} satisfies StoryObj<typeof MkPageHeader>;
export const OneTab = {
...Empty,
...Empty.args,
tab: 'sometabkey',
tabs: [
{
key: 'sometabkey',
title: 'Some Tab Title',
],
export const Icon = {
...OneTab,
...OneTab.args,
...OneTab.args.tabs[0],
icon: 'ti ti-home',
export const IconOnly = {
...Icon,
...Icon.args,
...Icon.args.tabs[0],
title: undefined,
iconOnly: true,
export const SomeTabs = {
tab: 'princess',
key: 'princess',
title: 'Princess',
icon: 'ti ti-crown',
key: 'fairy',
title: 'Fairy',
icon: 'ti ti-snowflake',
key: 'angel',
title: 'Angel',
icon: 'ti ti-feather',