diff --git a/src/components/emoji/nimble-emoji.js b/src/components/emoji/nimble-emoji.js
index 13f6017..0991d86 100644
--- a/src/components/emoji/nimble-emoji.js
+++ b/src/components/emoji/nimble-emoji.js
@@ -177,23 +177,36 @@ const NimbleEmoji = (props) => {
}
}
+ var Tag = {
+ name: 'span',
+ props: {},
+ }
+
+ if (props.onClick) {
+ Tag.name = 'button'
+ Tag.props = {
+ type: 'button'
+ }
+ }
+
if (props.html) {
style = _convertStyleToCSS(style)
- return ``
+ } class='${className}'>${children || ''}${Tag.name}>`
} else {
return (
-
+
)
}
}
diff --git a/src/utils/shared-default-props.js b/src/utils/shared-default-props.js
index 489869b..0517746 100644
--- a/src/utils/shared-default-props.js
+++ b/src/utils/shared-default-props.js
@@ -9,9 +9,6 @@ const EmojiDefaultProps = {
tooltip: false,
backgroundImageFn: (set, sheetSize) =>
`https://unpkg.com/emoji-datasource-${set}@${EMOJI_DATASOURCE_VERSION}/img/${set}/sheets-256/${sheetSize}.png`,
- onOver: () => {},
- onLeave: () => {},
- onClick: () => {},
}
const PickerDefaultProps = {