Sha256: e6f704245a572aacbea60178390e6ba8c754135a6ef74065dccdd4ba016b4777
Contents?: true
Size: 1.41 KB
Versions: 5
Compression:
Stored size: 1.41 KB
Contents
require_relative '../helpers/indented_grid' Voom::Presenters.define(:toggles) do helpers Demo::Helpers::IndentedGrid attach :top_nav attach :component_drawer page_title 'Toggles' indented_grid do headline 'CHECKBOX' checkbox checkbox checked: true headline 'RADIO BUTTON' radio_button checked: true radio_button headline 'ICON TOGGLE' icon_toggle 'format_bold', checked: true icon_toggle 'format_italic' headline 'SWITCH' switch checked: true switch grid do column 6 do display 'Field Level Events' heading 'Text Fields' body 'This demonstrates that a change event will submit the field value to the event action. '\ 'This works with posts and replace actions' switch name: :myfield do event :change do replaces :context_list, :context_list end end display 'Posts in Form' body 'This demonstrates that a change event on **ANY** form input will send all the form inputs to the event action. '\ 'This works with posts and replace actions' form do switch name: :myfield switch name: :myfield2 event :change do replaces :context_list, :context_list end end end column 6 do attach :context_list end end attach :code, file: __FILE__ end end
Version data entries
5 entries across 5 versions & 1 rubygems