Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@skava/ui / src / forms / input / plugins / Simple / LabelInput.tsx
Size: Mime:
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