Skip to content

Commit dc9cdb7

Browse files
committed
update js-cookie + update stories
1 parent da9a749 commit dc9cdb7

2 files changed

Lines changed: 57 additions & 6 deletions

File tree

component-library/pnpm-lock.yaml

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

component-library/src/components/custom/BccImage/BccImage.stories.ts

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ const gallerySrcs = [
77
'https://primefaces.org/cdn/primevue/images/galleria/galleria2.jpg',
88
'https://primefaces.org/cdn/primevue/images/galleria/galleria3.jpg',
99
];
10+
const videoSrc = 'https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4';
1011

1112
const meta: Meta<typeof BccImage> = {
1213
component: BccImage,
@@ -34,6 +35,13 @@ export const Default: Story = {
3435
},
3536
template: `<BccImage :src="imageSrc" alt="Landscape" width="250" />`,
3637
}),
38+
parameters: {
39+
docs: {
40+
source: {
41+
code: `<BccImage src="${imageSrc}" alt="Landscape" width="250" />`,
42+
},
43+
},
44+
},
3745
};
3846

3947
export const Preview: Story = {
@@ -44,6 +52,13 @@ export const Preview: Story = {
4452
},
4553
template: `<BccImage :src="imageSrc" alt="Landscape" width="250" preview />`,
4654
}),
55+
parameters: {
56+
docs: {
57+
source: {
58+
code: `<BccImage src="${imageSrc}" alt="Landscape" width="250" preview />`,
59+
},
60+
},
61+
},
4762
};
4863

4964
export const Gallery: Story = {
@@ -63,6 +78,24 @@ export const Gallery: Story = {
6378
/>
6479
`,
6580
}),
81+
parameters: {
82+
docs: {
83+
source: {
84+
code: `<BccImage
85+
src="${imageSrc}"
86+
:imgs="[
87+
'${gallerySrcs[0]}',
88+
'${gallerySrcs[1]}',
89+
'${gallerySrcs[2]}',
90+
]"
91+
alt="Landscape"
92+
width="250"
93+
preview
94+
loop
95+
/>`,
96+
},
97+
},
98+
},
6699
};
67100

68101
export const Video: Story = {
@@ -71,7 +104,7 @@ export const Video: Story = {
71104
setup() {
72105
return {
73106
posterSrc: imageSrc,
74-
videoSrc: 'https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4',
107+
videoSrc: videoSrc,
75108
};
76109
},
77110
template: `
@@ -84,4 +117,22 @@ export const Video: Story = {
84117
/>
85118
`,
86119
}),
120+
parameters: {
121+
docs: {
122+
source: {
123+
code: `<BccImage
124+
src="${imageSrc}"
125+
:imgs="[{
126+
src: '${videoSrc}',
127+
type: 'video',
128+
poster: '${imageSrc}',
129+
title: 'Sample video'
130+
}]"
131+
alt="Flower video"
132+
width="320"
133+
preview
134+
/>`,
135+
},
136+
},
137+
},
87138
};

0 commit comments

Comments
 (0)