Sha256: 917cea1336d97fa469f207fe240645c3e1ff9029e821b36e83877ae820ed6190
Contents?: true
Size: 1.18 KB
Versions: 7
Compression:
Stored size: 1.18 KB
Contents
require_relative '../helpers/indented_grid' Coprl::Presenters.define(:snackbar) do helpers Demo::Helpers::IndentedGrid attach :top_nav attach :component_drawer page_title 'Snackbar' indented_grid do title 'On Page' body 'You can invoke or attach a snackbar on the server side and will render after load.' snackbar 'Top Level Important Information!' # This is the same as above -- see POM at end of file # attach :snackbar_attached title 'As Event' button 'Show Snackbar', id: :show_snackbar do event :click do snackbar 'You clicked snackbar the button!' end end blank title 'Response from a POST' body 'You can return a string or array of strings in your CRUD response (`messages.snackbar`) and it will display after the event fires.' button 'Show Snackbar from Response' do event :click do posts '/_echo_snackbar_', snackbar_echo: 'Your operation succeeded!' end end end attach :code, file: __FILE__ end # Coprl::Presenters.define(:snackbar_attached) do # title 'In Attached' # body 'This can be done in an attached presenter as well' # snackbar 'Attached Snackbar Displayed!' # end
Version data entries
7 entries across 7 versions & 1 rubygems