@worksafevictoria/wcl7.5 1.1.4 → 1.1.6

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": "@worksafevictoria/wcl7.5",
3
- "version": "1.1.4",
3
+ "version": "1.1.6",
4
4
  "main": "src/index.js",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -19,75 +19,26 @@ const MockVideo = {
19
19
  export default {
20
20
  title: 'Paragraphs/Text + Media',
21
21
  component: TextMedia,
22
- argTypes: {
23
- content: {
24
- control: 'text',
25
- defaultValue:
26
- 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>'
27
- },
28
- titleText: {
29
- control: 'text',
30
- defaultValue: 'A sample media item'
31
- },
32
- titleTag: {
33
- control: 'text',
34
- defaultValue: 'h3'
35
- },
36
- hasBgColor: {
37
- control: 'boolean',
38
- defaultValue: false
39
- },
40
- flip: {
41
- control: 'boolean',
42
- defaultValue: false
43
- },
44
- rtl: {
45
- control: 'boolean',
46
- defaultValue: false
47
- },
48
- workwell: {
49
- control: 'boolean',
50
- defaultValue: false
51
- },
52
- video: {
53
- control: 'object'
54
- },
55
- image: {
56
- control: 'object'
57
- },
58
- mediaType: {
59
- control: 'text'
60
- },
61
- storybook: {
62
- control: 'boolean',
63
- defaultValue: true
64
- },
65
- hideImageMob: {
66
- control: 'boolean',
67
- defaultValue: false
68
- }
22
+ args: {
23
+ content: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>',
24
+ titleText: 'A sample media item',
25
+ titleTag: 'h3',
26
+ hasBgColor: false,
27
+ flip: false,
28
+ rtl: false,
29
+ workwell: false,
30
+ storybook: true,
31
+ hideImageMob: false
69
32
  }
70
33
  }
71
34
 
72
- const TextWithImageDefault = (args, { argTypes }) => ({
73
- components: { TextMedia },
74
- props: Object.keys(argTypes),
75
- template: `<text-media v-bind="$props" />`
76
- })
77
-
78
- export const TextWithImage = TextWithImageDefault.bind({})
35
+ export const TextWithImage = {}
79
36
  TextWithImage.args = {
80
37
  mediaType: 'image',
81
38
  image: MockImage
82
39
  }
83
40
 
84
- const TextWithVideoDefault = (args, { argTypes }) => ({
85
- components: { TextMedia },
86
- props: Object.keys(argTypes),
87
- template: `<text-media v-bind="$props" />`
88
- })
89
-
90
- export const TextWithVideo = TextWithVideoDefault.bind({})
41
+ export const TextWithVideo = {}
91
42
  TextWithVideo.args = {
92
43
  mediaType: 'video',
93
44
  video: MockVideo
@@ -107,45 +107,28 @@ export default {
107
107
  title: 'Paragraphs/VideoGrid',
108
108
  component: { VideoGrid, Container, Row, Column },
109
109
  argTypes: {
110
- gridTitle: {
111
- control: 'text',
112
- defaultValue: mockData.title
113
- },
114
110
  titleTag: {
115
111
  control: 'select',
116
- options: ['h2', 'h3'],
117
- defaultValue: 'h2'
118
- },
119
- gridDescription: {
120
- control: 'text',
121
- defaultValue: mockData.description
122
- },
123
- videoList: {
124
- control: 'object',
125
- defaultValue: mockData.videos
126
- },
127
- rtl: {
128
- control: 'boolean',
129
- defaultValue: mockData.rtl
130
- },
131
- threeColumns: {
132
- control: 'boolean',
133
- defaultValue: mockData.threeColumns
134
- },
135
- greyBackground: {
136
- control: 'boolean',
137
- defaultValue: mockData.greyBackground
138
- },
139
- cta: {
140
- control: 'object',
141
- defaultValue: mockData.cta
112
+ options: ['h2', 'h3']
142
113
  }
114
+ },
115
+ args: {
116
+ gridTitle: mockData.title,
117
+ titleTag: 'h2',
118
+ gridDescription: mockData.description,
119
+ videoList: mockData.videos,
120
+ rtl: mockData.rtl,
121
+ threeColumns: mockData.threeColumns,
122
+ greyBackground: mockData.greyBackground,
123
+ cta: mockData.cta
143
124
  }
144
125
  }
145
126
 
146
127
  const YoutubeContent = (args, { argTypes }) => ({
147
128
  components: { VideoGrid, Container, Row, Column },
148
- props: Object.keys(argTypes),
129
+ setup() {
130
+ return { args };
131
+ },
149
132
  data() {
150
133
  return {
151
134
  videos: mockData.videos
@@ -156,7 +139,7 @@ const YoutubeContent = (args, { argTypes }) => ({
156
139
  <row>
157
140
  <column>
158
141
  <video-grid
159
- v-bind="$props"
142
+ v-bind="args"
160
143
  />
161
144
  </column>
162
145
  </row>
@@ -165,3 +148,4 @@ const YoutubeContent = (args, { argTypes }) => ({
165
148
  })
166
149
 
167
150
  export const Youtube = YoutubeContent.bind({})
151
+