Sha256: 84b0dcd1726d595b1d275a082a35df410800dff389b99589e4278571f0ec0684

Contents?: true

Size: 825 Bytes

Versions: 12

Compression:

Stored size: 825 Bytes

Contents

Rev.registerExample('Lists', class ListsExample extends React.Component {

  render() {
    const {Emptyable, Panel} = Rev.Components
    const nonEmptyList = ['There are children in this Emptyable.', 'The empty state will not be displayed.']
    const emptyList = []

    return (
      <div>
        <h3>{"<Emptyable>"}</h3>
        <Emptyable componentClass="ul" emptyState={
          <p>This is the empty state. It will not be displayed.</p>
        }>
          {nonEmptyList.map((item) => <li key={item}>{item}</li>)}
        </Emptyable>
        <Emptyable componentClass="ul" emptyState={
          <Panel>This is the empty state. It is displayed because the Emptyable has no children.</Panel>
        }>
          {emptyList.map((item) => <li key={item}>{item}</li>)}
        </Emptyable>
      </div>
    )
  }
})

Version data entries

12 entries across 12 versions & 1 rubygems

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