DRY preview/title

release
Etienne Lemay 2016-06-01 15:25:45 -04:00
parent ecd2eb5e74
commit 49b8c2d6be
3 changed files with 14 additions and 13 deletions

View File

@ -14,7 +14,6 @@
.emoji-picker-bar { .emoji-picker-bar {
background-color: #f4f4f4; background-color: #f4f4f4;
padding: 12px;
} }
.emoji-picker-bar:first-child { .emoji-picker-bar:first-child {
border-top-left-radius: 5px; border-top-left-radius: 5px;
@ -126,5 +125,4 @@
.emoji-picker-title-label { .emoji-picker-title-label {
font-size: 26px; font-size: 26px;
font-weight: 500; font-weight: 500;
margin-left: .4em;
} }

View File

@ -100,7 +100,7 @@ export default class Picker extends React.Component {
})} })}
</div> </div>
<div className='emoji-picker-bar emoji-picker-preview'> <div className='emoji-picker-bar'>
<Preview <Preview
ref='preview' ref='preview'
emojiProps={{ emojiProps={{

View File

@ -12,7 +12,7 @@ export default class Preview extends React.Component {
{ emojiProps } = this.props { emojiProps } = this.props
if (emoji) { if (emoji) {
return <div> return <div className='emoji-picker-preview'>
<div className='emoji-picker-preview-emoji'> <div className='emoji-picker-preview-emoji'>
<Emoji <Emoji
key={emoji.short_name || emoji} key={emoji.short_name || emoji}
@ -31,16 +31,19 @@ export default class Preview extends React.Component {
</div> </div>
</div> </div>
} else { } else {
return <div className='emoji-picker-title'> return <div className='emoji-picker-preview'>
<Emoji <div className='emoji-picker-preview-emoji'>
{...emojiProps} <Emoji
emoji='tophat' emoji='tophat'
size={46} {...emojiProps}
/> />
</div>
<span className='emoji-picker-title-label'> <div className='emoji-picker-preview-data'>
EmojiPicker <span className='emoji-picker-title-label'>
</span> EmojiPicker
</span>
</div>
</div> </div>
} }
} }