Merge pull request #299 from nolanlawson/nolan/emoji-list

fix: make each emoji category into a list
nolan/hinaloe-test
Nolan Lawson 2019-03-14 08:33:08 -07:00 committed by GitHub
commit c6c302ecae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 3 deletions

View File

@ -160,6 +160,18 @@
background-color: rgba(255, 255, 255, .95); background-color: rgba(255, 255, 255, .95);
} }
.emoji-mart-category-list {
margin: 0;
padding: 0;
}
.emoji-mart-category-list li {
list-style: none;
margin: 0;
padding: 0;
display: inline-block;
}
.emoji-mart-emoji { .emoji-mart-emoji {
position: relative; position: relative;
display: inline-block; display: inline-block;

View File

@ -195,10 +195,15 @@ export default class Category extends React.Component {
</span> </span>
</div> </div>
<ul className="emoji-mart-category-list">
{emojis && {emojis &&
emojis.map((emoji) => emojis.map((emoji) => (
NimbleEmoji({ emoji: emoji, data: this.data, ...emojiProps }), <li key={emoji.id || emoji}>
{NimbleEmoji({ emoji: emoji, data: this.data, ...emojiProps })}
</li>
)
)} )}
</ul>
{emojis && {emojis &&
!emojis.length && ( !emojis.length && (

View File

@ -185,7 +185,6 @@ const NimbleEmoji = (props) => {
} else { } else {
return ( return (
<button <button
key={props.emoji.id || props.emoji}
onClick={(e) => _handleClick(e, props)} onClick={(e) => _handleClick(e, props)}
onMouseEnter={(e) => _handleOver(e, props)} onMouseEnter={(e) => _handleOver(e, props)}
onMouseLeave={(e) => _handleLeave(e, props)} onMouseLeave={(e) => _handleLeave(e, props)}