Sha256: f7db0820015fcb50c5243f08de7ecb8ad5df7baf122b9d3d5933b5873ae42782
Contents?: true
Size: 947 Bytes
Versions: 7
Compression:
Stored size: 947 Bytes
Contents
require_relative '../helpers/indented_grid' Voom::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 attach a snackbar on the server side and will render after load.' snackbar 'Top Level Important Information!' 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
Version data entries
7 entries across 7 versions & 1 rubygems