import React from 'react'; import classnames from 'classnames'; interface Props { value: string; onChange: (text: string) => void; onBlur: () => void; } type State = { text: String; } class StickerDesc extends React.PureComponent { state = { text: this.props.value, }; setText = e => { this.props.onChange(e.target.value); }; blockMouse = e => { e.preventDefault(); e.stopPropagation(); if (!this.input) { return } this.input.focus(); }; input: HTMLTextAreaElement | null = null; render() { const { value: text } = this.props; return (
') || ' ') }} />