Tighten up Editable className
This commit is contained in:
parent
ed2f4358dc
commit
def630e705
1 changed files with 7 additions and 2 deletions
|
@ -72,7 +72,7 @@ class Editable extends React.PureComponent<Props> {
|
||||||
}
|
}
|
||||||
|
|
||||||
render(): JSX.Element {
|
render(): JSX.Element {
|
||||||
const {text, className, style, placeholderText, isMarkdown, isMultiline, onFocus, onBlur, onKeyDown, onChanged} = this.props
|
const {text, style, placeholderText, isMarkdown, isMultiline, onFocus, onBlur, onKeyDown, onChanged} = this.props
|
||||||
|
|
||||||
const initialStyle = {...this.props.style}
|
const initialStyle = {...this.props.style}
|
||||||
|
|
||||||
|
@ -83,10 +83,15 @@ class Editable extends React.PureComponent<Props> {
|
||||||
html = ''
|
html = ''
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let className = 'octo-editable'
|
||||||
|
if (this.props.className) {
|
||||||
|
className += ' ' + this.props.className
|
||||||
|
}
|
||||||
|
|
||||||
const element = (
|
const element = (
|
||||||
<div
|
<div
|
||||||
ref={this.elementRef}
|
ref={this.elementRef}
|
||||||
className={'octo-editable ' + className}
|
className={className}
|
||||||
contentEditable={true}
|
contentEditable={true}
|
||||||
suppressContentEditableWarning={true}
|
suppressContentEditableWarning={true}
|
||||||
style={initialStyle}
|
style={initialStyle}
|
||||||
|
|
Loading…
Reference in a new issue