Skip to content

Commit

Permalink
chore: move nuxt link test to showcase example (#618)
Browse files Browse the repository at this point in the history
Follow-up: #666
  • Loading branch information
tobiasdiez authored Jun 28, 2024
1 parent 0643f9c commit 2350dc6
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions examples/showcase/components/MyNuxtLink.stories.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import type { Meta, StoryObj } from '@storybook/vue3'

import MyNuxtLink from './MyNuxtLink.vue'

// More on how to set up stories at: https://storybook.js.org/docs/vue/writing-stories/introduction

/**
* Shows how to use NuxtLink component
*/
const meta = {
title: 'Features/Nuxt Link',
component: MyNuxtLink,
// This component will have an automatically generated docsPage entry: https://storybook.js.org/docs/vue/writing-docs/autodocs
tags: ['autodocs'],
argTypes: {
default: {
control: 'text',
description: 'Link text',
},
},
args: {
default: 'Nuxt Link',
},
} satisfies Meta<typeof MyNuxtLink>

export default meta
type Story = StoryObj<typeof meta>
/*
*👇 Render functions are a framework specific feature to allow you control on how the component renders.
* See https://storybook.js.org/docs/vue/api/csf
* to learn how to use render functions.
*/

export const NuxtLinkInCustomComponent: Story = {
args: {},
render(args) {
return {
components: { MyNuxtLink },
setup: () => ({ args }),
template: '<my-nuxt-link>{{ args.default }}</my-nuxt-link>',
}
},
}
export const NuxtLinkInTemplate: Story = {
args: {},
render(args) {
return {
setup: () => ({ args }),
template: '<NuxtLink>{{ args.default }}</NuxtLink>',
}
},
}
File renamed without changes.

0 comments on commit 2350dc6

Please sign in to comment.