mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-30 08:16:17 +01:00
22 lines
389 B
JavaScript
22 lines
389 B
JavaScript
import PureRenderMixin from 'react-addons-pure-render-mixin';
|
|
|
|
const CharacterCounter = React.createClass({
|
|
|
|
propTypes: {
|
|
text: React.PropTypes.string.isRequired
|
|
},
|
|
|
|
mixins: [PureRenderMixin],
|
|
|
|
render () {
|
|
return (
|
|
<span style={{ fontSize: '16px', cursor: 'default' }}>
|
|
{this.props.text.length}
|
|
</span>
|
|
);
|
|
}
|
|
|
|
});
|
|
|
|
export default CharacterCounter;
|