@@ -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
1112const 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
3947export 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
4964export 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
68101export 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