Sha256: d29dd8d7208fca5829318c36f0eda39fbe659747cbf0782113fa6f2f1b45163d
Contents?: true
Size: 948 Bytes
Versions: 5
Compression:
Stored size: 948 Bytes
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 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
5 entries across 5 versions & 1 rubygems