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

fix: make each emoji category into a list
release
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);
}
.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 {
position: relative;
display: inline-block;

View File

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

View File

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