-
-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: move nuxt link test to showcase example (#618)
Follow-up: #666
- Loading branch information
1 parent
0643f9c
commit 2350dc6
Showing
2 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.