@storybook/vue3 7.1.0-alpha.29 → 7.1.0-alpha.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@storybook/vue3",
|
3
|
-
"version": "7.1.0-alpha.
|
3
|
+
"version": "7.1.0-alpha.30",
|
4
4
|
"description": "Storybook Vue 3 renderer",
|
5
5
|
"keywords": [
|
6
6
|
"storybook"
|
@@ -48,13 +48,13 @@
|
|
48
48
|
"prep": "../../../scripts/prepare/bundle.ts"
|
49
49
|
},
|
50
50
|
"dependencies": {
|
51
|
-
"@storybook/core-client": "7.1.0-alpha.
|
52
|
-
"@storybook/docs-tools": "7.1.0-alpha.
|
51
|
+
"@storybook/core-client": "7.1.0-alpha.30",
|
52
|
+
"@storybook/docs-tools": "7.1.0-alpha.30",
|
53
53
|
"@storybook/global": "^5.0.0",
|
54
|
-
"@storybook/preview-api": "7.1.0-alpha.
|
55
|
-
"@storybook/types": "7.1.0-alpha.
|
54
|
+
"@storybook/preview-api": "7.1.0-alpha.30",
|
55
|
+
"@storybook/types": "7.1.0-alpha.30",
|
56
56
|
"ts-dedent": "^2.0.0",
|
57
|
-
"type-fest": "
|
57
|
+
"type-fest": "^3.11.0",
|
58
58
|
"vue-component-type-helpers": "^1.6.5"
|
59
59
|
},
|
60
60
|
"devDependencies": {
|
@@ -82,4 +82,4 @@
|
|
82
82
|
"platform": "browser"
|
83
83
|
},
|
84
84
|
"gitHead": "e6a7fd8a655c69780bc20b9749c2699e44beae16"
|
85
|
-
}
|
85
|
+
}
|
package/src/typings.d.ts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
declare var STORYBOOK_ENV: 'vue3';
|
@@ -0,0 +1,46 @@
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/vue3';
|
2
|
+
|
3
|
+
import GlobalUsage from './GlobalUsage.vue';
|
4
|
+
import GlobalSetup from './GlobalSetup.vue';
|
5
|
+
|
6
|
+
const meta: Meta = {
|
7
|
+
component: GlobalUsage,
|
8
|
+
argTypes: {},
|
9
|
+
tags: ['autodocs'],
|
10
|
+
} satisfies Meta<typeof GlobalUsage>;
|
11
|
+
|
12
|
+
export default meta;
|
13
|
+
type Story = StoryObj<typeof meta>;
|
14
|
+
|
15
|
+
export const MultiComponents: Story = {
|
16
|
+
args: {
|
17
|
+
label: 'Button',
|
18
|
+
size: 'large',
|
19
|
+
backgroundColor: '#aa00ff',
|
20
|
+
btn1Args: { label: 'Button 10', size: 'small', backgroundColor: '#aa00ff' },
|
21
|
+
},
|
22
|
+
render(args: any) {
|
23
|
+
return {
|
24
|
+
components: { GlobalUsage, GlobalSetup },
|
25
|
+
setup() {
|
26
|
+
return { args };
|
27
|
+
},
|
28
|
+
template: `<div style="background-color:pink;opacity:0.9;padding:20px" >
|
29
|
+
|
30
|
+
<div style="display:flex;gap:10px">
|
31
|
+
<img src="https://user-images.githubusercontent.com/263385/199832481-bbbf5961-6a26-481d-8224-51258cce9b33.png" width="200" />
|
32
|
+
<GlobalUsage v-bind="args.btn1Args" />
|
33
|
+
</div>
|
34
|
+
<h2>Complex Story Custom template </h2> <br/> <hr/>
|
35
|
+
|
36
|
+
<GlobalSetup :label="args.label" />
|
37
|
+
<div style="margin:8px"><span style="font-size:28px;color:green">Multiple </span>
|
38
|
+
<span style="background-color:magenta;opacity:0.9;padding:8px"><i>Components</i></span></div>
|
39
|
+
<div style="display:flex;gap:10px">
|
40
|
+
<GlobalUsage v-bind="args" />
|
41
|
+
<GlobalUsage label="Static Label Dynamic color" :background-color="args.backgroundColor"/>
|
42
|
+
</div>
|
43
|
+
</div>`,
|
44
|
+
};
|
45
|
+
},
|
46
|
+
};
|