-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
- Loading branch information
There are no files selected for viewing
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
import EmojiPanel from 'emoji-panel'; | ||
|
||
new EmojiPanel(document.getElementById('panel-example-1')); | ||
new EmojiPanel(document.getElementById('panel-example-1'), { onClick: ({ index } = {}) => { | ||
console.log(index); | ||
} }); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
import panelTemplate from './template.ahtml'; | ||
import setEventsForTemplate from './set-events-for-template'; | ||
|
||
export default ({ imageSet, size, animationDuration } = {}) => { | ||
export default ({ animationDuration, panelVariables, eventListeners } = {}) => { | ||
const panelEl = document.createElement('div'); | ||
panelEl.setAttribute('class', 'ep-container'); | ||
panelEl.innerHTML = panelTemplate; | ||
setEventsForTemplate(panelEl, { animationDuration }); | ||
setEventsForTemplate(panelEl, { animationDuration, panelVariables, eventListeners }); | ||
|
||
return panelEl; | ||
}; |