Don’t apply `emoji-mart-no-results` class when using custom notFound component

release
Etienne Lemay 2018-07-30 16:52:15 -04:00
parent 8e6d363d8b
commit 3dc3e2fd95
No known key found for this signature in database
GPG Key ID: EE7CF89146BB28E9
2 changed files with 4 additions and 6 deletions

View File

@ -176,9 +176,7 @@ export default class Category extends React.Component {
return (
<div
ref={this.setContainerRef}
className={`emoji-mart-category ${
emojis && !emojis.length ? 'emoji-mart-no-results' : ''
}`}
className="emoji-mart-category"
style={containerStyles}
>
<div

View File

@ -6,8 +6,8 @@ export default class NotFound extends React.PureComponent {
render() {
const { data, emojiProps, i18n, notFound } = this.props
const imageComponent = (notFound && notFound()) || (
<div>
const component = (notFound && notFound()) || (
<div className="emoji-mart-no-results">
{NimbleEmoji({
data: data,
...emojiProps,
@ -21,7 +21,7 @@ export default class NotFound extends React.PureComponent {
</div>
)
return <div className="emoji-mart-no-results">{imageComponent}</div>
return component
}
}