Skip to content

Commit 9120835

Browse files
author
Amir Tocker
committed
Add story with event listeners
1 parent bb23f9c commit 9120835

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

stories/index.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,26 @@ storiesOf('Image', module).addWithInfo('image', "Basic tag", ()=> {
5959
<Image cloudName="demo" publicId="sample" width="100" crop="scale"/>
6060
</div>
6161
)
62+
}).addWithInfo('image with events', 'image with events', ()=> {
63+
let options = {
64+
onLoad: ()=> {
65+
let e = document.getElementById("eventResult");
66+
e.innerHTML = e.innerHTML + "<br>loaded";
67+
},
68+
onMouseOver: ()=> {
69+
let e = document.getElementById("eventResult");
70+
e.innerHTML = e.innerHTML + "<br>Mouse over";
71+
72+
},
73+
width: 200,
74+
crop: "scale"
75+
};
76+
return (
77+
<div>
78+
<Image {...options} cloudName="demo" publicId="sample" />
79+
<div id="eventResult"></div>
80+
</div>
81+
)
6282
});
6383
storiesOf('Video', module).addWithInfo('Simple tag', 'Simple tag', ()=> {
6484
return (

0 commit comments

Comments
 (0)