Sha256: c691a8d3c59f03ef9554d31c630c038e186101e4c449dd13513fd35f2fba107b
Contents?: true
Size: 623 Bytes
Versions: 2
Compression:
Stored size: 623 Bytes
Contents
class Counter include Inesita::Component def inc store.increase render! end def dec store.decrease render! end def render h4 do text props[:header] end div class: 'input-group' do span class: 'input-group-btn' do button class: 'btn btn-default', onclick: method(:dec) do text '-' end end input type: "text", class: "form-control", value: store.counter, disabled: true span class: 'input-group-btn' do button class: 'btn btn-default', onclick: -> { inc } do text '+' end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
inesita-0.6.1 | lib/inesita/cli/template/app/components/counter.rb.tt |
inesita-0.6.0 | lib/inesita/cli/template/app/components/counter.rb.tt |