File tree Expand file tree Collapse file tree 2 files changed +57
-0
lines changed
Expand file tree Collapse file tree 2 files changed +57
-0
lines changed Original file line number Diff line number Diff line change 1+ import type { Meta , StoryObj } from '@nuxtjs/storybook'
2+ import Component from './Default.vue'
3+
4+ const meta = {
5+ component : Component ,
6+ tags : [ 'autodocs' ] ,
7+ decorators : [
8+ ( ) => ( {
9+ template : '<div style="width:1200px;height:630px; outline:1px solid red"><story/></div>' ,
10+ } ) ,
11+ ] ,
12+ argTypes : {
13+ primaryColor : {
14+ control : { type : 'color' } ,
15+ description : 'Primary color used throughout the OG image' ,
16+ } ,
17+ title : {
18+ control : { type : 'text' } ,
19+ description : 'Main title displayed in the OG image' ,
20+ } ,
21+ description : {
22+ control : { type : 'text' } ,
23+ description : 'Description text (supports **bold** markdown)' ,
24+ } ,
25+ } ,
26+ } satisfies Meta < typeof Component >
27+
28+ export default meta
29+ type Story = StoryObj < typeof meta >
30+
31+ export const Default : Story = { }
32+
33+ export const CustomContent : Story = {
34+ args : {
35+ title : 'Custom Package' ,
36+ description : 'an awesome **customizable** OG image generator' ,
37+ primaryColor : '#f59e0b' ,
38+ } ,
39+ }
Original file line number Diff line number Diff line change 1+ import type { Meta , StoryObj } from '@nuxtjs/storybook'
2+ import Component from './Package.vue'
3+
4+ const meta = {
5+ component : Component ,
6+ decorators : [
7+ ( ) => ( {
8+ template : '<div style="width:1200px;height:630px; outline:1px solid red"><story/></div>' ,
9+ } ) ,
10+ ] ,
11+ } satisfies Meta < typeof Component >
12+
13+ export default meta
14+ type Story = StoryObj < typeof meta >
15+
16+ export const Package : Story = {
17+ args : { name : 'vue' , version : 'latest' } ,
18+ }
You can’t perform that action at this time.
0 commit comments