Adding Emoji One
This commit is contained in:
@ -1,5 +1,10 @@
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
import PureRenderMixin from 'react-addons-pure-render-mixin';
|
||||
import PureRenderMixin from 'react-addons-pure-render-mixin';
|
||||
import emojione from 'emojione';
|
||||
|
||||
emojione.imageType = 'png';
|
||||
emojione.sprites = false;
|
||||
emojione.imagePathPNG = '/emoji/';
|
||||
|
||||
const StatusContent = React.createClass({
|
||||
|
||||
@ -55,7 +60,7 @@ const StatusContent = React.createClass({
|
||||
},
|
||||
|
||||
render () {
|
||||
const content = { __html: this.props.status.get('content') };
|
||||
const content = { __html: emojione.unicodeToImage(this.props.status.get('content')) };
|
||||
return <div className='status__content' dangerouslySetInnerHTML={content} />;
|
||||
},
|
||||
|
||||
|
@ -71,6 +71,17 @@
|
||||
}
|
||||
}
|
||||
|
||||
.emojione {
|
||||
display: inline-block;
|
||||
font-size: inherit;
|
||||
vertical-align: middle;
|
||||
margin: -.2ex .15em .2ex;
|
||||
|
||||
img {
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.status__content, .reply-indicator__content {
|
||||
font-size: 15px;
|
||||
line-height: 20px;
|
||||
@ -78,6 +89,11 @@
|
||||
font-weight: 300;
|
||||
overflow: hidden;
|
||||
|
||||
.emojione {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-bottom: 20px;
|
||||
|
||||
@ -110,6 +126,11 @@
|
||||
.status__content {
|
||||
font-size: 19px;
|
||||
line-height: 24px;
|
||||
|
||||
.emojione {
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user