From 1a2d400362f903a9eb8d2a960fc8ee370a766cda Mon Sep 17 00:00:00 2001 From: Etienne Lemay Date: Fri, 29 Sep 2017 19:26:04 -0400 Subject: [PATCH] Signify custom emoji elements with class [Ref #117] --- src/components/emoji.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/emoji.js b/src/components/emoji.js index eee0124..e13c6e0 100644 --- a/src/components/emoji.js +++ b/src/components/emoji.js @@ -56,13 +56,15 @@ const Emoji = (props) => { var { unified, custom, imageUrl } = _getData(props), style = {}, - children = props.children + children = props.children, + className = 'emoji-mart-emoji' if (!unified && !custom) { return null } if (props.native && unified) { + className += ' emoji-mart-emoji-native' style = { fontSize: props.size } children = unifiedToNative(unified) @@ -72,6 +74,7 @@ const Emoji = (props) => { style.height = props.size } } else if (custom) { + className += ' emoji-mart-emoji-custom' style = { width: props.size, height: props.size, @@ -101,7 +104,7 @@ const Emoji = (props) => { onClick={(e) => _handleClick(e, props)} onMouseEnter={(e) => _handleOver(e, props)} onMouseLeave={(e) => _handleLeave(e, props)} - className='emoji-mart-emoji'> + className={className}> {children} }