Skip to content

Commit f441ce8

Browse files
committed
op images
1 parent 2ce0c54 commit f441ce8

3 files changed

Lines changed: 93 additions & 0 deletions

File tree

.storybook/preview.ts

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,50 @@ const preview: Preview = {
88
date: /Date$/i,
99
},
1010
},
11+
viewport: {
12+
viewports: {
13+
mobile1: {
14+
name: 'Small mobile',
15+
styles: {
16+
width: '320px',
17+
height: '568px',
18+
},
19+
type: 'mobile',
20+
},
21+
mobile2: {
22+
name: 'Large mobile',
23+
styles: {
24+
width: '414px',
25+
height: '896px',
26+
},
27+
type: 'mobile',
28+
},
29+
tablet: {
30+
name: 'Tablet',
31+
styles: {
32+
width: '834px',
33+
height: '1112px',
34+
},
35+
type: 'tablet',
36+
},
37+
desktop: {
38+
name: 'Desktop',
39+
styles: {
40+
width: '1024px',
41+
height: '1280px',
42+
},
43+
type: 'desktop',
44+
},
45+
ogImage: {
46+
name: 'OG Image (1200×630)',
47+
styles: {
48+
width: '1200px',
49+
height: '630px',
50+
},
51+
type: 'desktop',
52+
},
53+
},
54+
},
1155
},
1256
}
1357

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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+
argTypes: {
8+
primaryColor: {
9+
control: { type: 'color' },
10+
description: 'Primary color used throughout the OG image',
11+
},
12+
title: {
13+
control: { type: 'text' },
14+
description: 'Main title displayed in the OG image',
15+
},
16+
description: {
17+
control: { type: 'text' },
18+
description: 'Description text (supports **bold** markdown)',
19+
},
20+
},
21+
} satisfies Meta<typeof Component>
22+
23+
export default meta
24+
type Story = StoryObj<typeof meta>
25+
26+
export const Default: Story = {
27+
args: {},
28+
}
29+
30+
export const CustomContent: Story = {
31+
args: {
32+
title: 'Custom Package',
33+
description: 'an awesome **customizable** OG image generator',
34+
primaryColor: '#f59e0b',
35+
},
36+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import type { Meta, StoryObj } from '@nuxtjs/storybook'
2+
import Component from './Package.vue'
3+
4+
const meta = {
5+
component: Component,
6+
} satisfies Meta<typeof Component>
7+
8+
export default meta
9+
type Story = StoryObj<typeof meta>
10+
11+
export const Package: Story = {
12+
args: {},
13+
}

0 commit comments

Comments
 (0)