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

View File

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

View File

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