Sha256: 2d898daac66e5c76e3497f73aa05bfe701bd2c256124f2bbf72641caf4fb0dae

Contents?: true

Size: 558 Bytes

Versions: 12

Compression:

Stored size: 558 Bytes

Contents

Rev.registerComponent('Emptyable', class Emptyable extends React.Component {

  static get propTypes() {
    return {
      componentClass: React.PropTypes.node,
      emptyState: React.PropTypes.element.isRequired,
    }
  }

  static get defaultProps() {
    return {
      componentClass: 'div',
    }
  }

  render() {
    if(this.props.children && this.props.children.length > 0) {
      return React.createElement(
        this.props.componentClass,
        this.props,
        this.props.children
      )
    }
    return this.props.emptyState
  }
})

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
revelry_core-0.1.24.0 app/assets/javascripts/revelry/ui/lists/Emptyable.es6
revelry_core-0.1.23.0 app/assets/javascripts/revelry/ui/lists/Emptyable.es6
revelry_core-0.1.22.0 app/assets/javascripts/revelry/ui/lists/Emptyable.es6
revelry_core-0.1.21.0 app/assets/javascripts/revelry/ui/lists/Emptyable.es6
revelry_core-0.1.20.0 app/assets/javascripts/revelry/ui/lists/Emptyable.es6
revelry_core-0.1.19.0 app/assets/javascripts/revelry/ui/lists/Emptyable.es6
revelry_core-0.1.18.0 app/assets/javascripts/revelry/ui/lists/Emptyable.es6
revelry_core-0.1.17.0 app/assets/javascripts/revelry/ui/lists/Emptyable.es6
revelry_core-0.1.16.0 app/assets/javascripts/revelry/ui/lists/Emptyable.es6
revelry_core-0.1.15.0 app/assets/javascripts/revelry/ui/lists/Emptyable.es6
revelry_core-0.1.14.0 app/assets/javascripts/revelry/ui/lists/Emptyable.es6
revelry_core-0.1.13.0 app/assets/javascripts/revelry/ui/lists/Emptyable.es6