Sha256: 681727b38d61acae0112bd1c9ced56bdc219b42d296cfc129cecf619c2e043e4
Contents?: true
Size: 1.47 KB
Versions: 46
Compression:
Stored size: 1.47 KB
Contents
Rev.pullInto(this) 'Row', 'Col' Rev.appComponent 'Revelry.Index', getInitialState: -> state = examples: "Rev" getScope: -> switch @state.examples when "Rev" then global.Rev when "App" then global.Rev.App onChangeView: (e) -> state = {} state[e.target.name] = e.target.value @setState state renderExample: (component, name) -> props = id: name if React.createElement? React.createElement(component, @props.options) else <component {...@props.options} /> <Row key={name}> <hr /> <h2>{name}</h2> { if React.createElement? React.createElement(component, props) else <component {...props} /> } </Row> render: -> <div> <Row> <h1>Revelry Guide</h1> <Col large="2" medium="3" small="6"> <label> <input type="radio" name="examples" value="Rev" checked={"Rev" == @state.examples} onChange={@onChangeView} /> Revelry </label> </Col> <Col large="2" medium="3" small="6" end> <label> <input type="radio" name="examples" value="App" checked={"App" == @state.examples} onChange={@onChangeView} /> Application </label> </Col> </Row> {_.map @getScope().Examples, @renderExample} </div>
Version data entries
46 entries across 46 versions & 1 rubygems