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    
Size: Mime:
import React from 'react'
import { PlusMinusProps } from './typings'
import { defaultRenderIconView, defaultWrapper } from './renderProps'

class PlusMinusIcon extends React.PureComponent<PlusMinusProps> {
  static defaultProps = {
    type: 'plus',
    isDisabled: false,
    nowrap: false,
    renderIconView: defaultRenderIconView,
    renderWrapper: defaultWrapper,
  }
  render() {
    const { className, renderIconView, renderWrapper, type, isDisabled } = this.props

    const label = type + ' icon'
    const iconView = renderIconView(this.props)

    const attributes = {
      className,
      type,
      isDisabled,
      'aria-disabled': isDisabled,
      'aria-label': label,
    }

    return renderWrapper(this.props, attributes, iconView)
  }
}

export { PlusMinusIcon }
export default PlusMinusIcon