Repository URL to install this package:
|
Version:
4.2.0-a11y.0 ▾
|
import React from 'react'
import { LabelWithAction } from 'molecules/LabelWithAction/index'
import { InputChain } from '../../InputChain'
class LabelInput extends InputChain {
static isSatisfiedByProps(props): boolean {
return props.type === 'label'
}
render() {
const props = this.get('props')
const state = this.get('state')
console.log('LabelInput', props)
const { onClick, classes, icon, labelText, text, value, label } = props
const computedText = labelText || text || value || label
const wrapperClass = props.wrapperClass || ''
const attributes = {
...props,
text: computedText,
onClick,
classes,
icon,
wrapperClass,
}
return <LabelWithAction {...attributes} key={computedText} />
}
}
export { LabelInput }
export default LabelInput