2 * Created by onvelocity on 2/13/16.
5 import React
from 'react'
6 import ClassNames
from 'classnames'
7 export default function ContentEditableDiv (props
) {
9 const fontWidth
= parseFloat(props
.fontWidth
) || 15;
10 const size
= props
.autoPadRight
? Math
.max(50, String(props
.name
).length
* fontWidth
) : 0;
11 const style
= {borderColor
: 'transparent', background
: 'transparent'};
13 style
.paddingRight
= size
;
17 <div className
={ClassNames('ContentEditableDiv', {'-is-disabled': props
.disabled
})}><input
{...props
} style
={style
} /></div>