Skip to content

Commit

Permalink
Merge pull request missive#299 from nolanlawson/nolan/emoji-list
Browse files Browse the repository at this point in the history
fix: make each emoji category into a list
  • Loading branch information
nolanlawson committed Mar 13, 2019
2 parents 7092207 + f98526a commit 9d547ac
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
12 changes: 12 additions & 0 deletions css/emoji-mart.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
9 changes: 7 additions & 2 deletions src/components/category.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 && (
Expand Down
1 change: 0 additions & 1 deletion src/components/emoji/nimble-emoji.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)}
Expand Down

0 comments on commit 9d547ac

Please sign in to comment.