Sha256: 0b313d9f0f0394332fee880b02af502e02abe4c1ac65c288213887de44686b8b
Contents?: true
Size: 1.58 KB
Versions: 6
Compression:
Stored size: 1.58 KB
Contents
require_relative '../helpers/indented_grid' Voom::Presenters.define(:file_inputs) do helpers Demo::Helpers::IndentedGrid attach :top_nav attach :component_drawer page_title 'File Inputs' indented_grid do file_input name: :event_image, preview: [:preview_id, :filename] do grid do column 6 do card do image width: 200, id: :preview_id text id: :filename text 'Drag and drop or click this button to upload' button icon: :cloud_upload end end column 6 do end end end title 'Simple' file_input name: :upload title 'With image preview' file_input preview: :image_id, accept: 'image/png, image/jpeg, image/gif, image/svg+xml' image 'http://geotix.com/application/files/3514/5564/7308/MyNorthTicketsLogo.png', width: 100, id: :image_id title 'With image button preview' file_input preview: :button_id, accept: 'image/png, image/jpeg, image/gif, image/svg+xml' button type: :image, id: :button_id do image 'http://geotix.com/application/files/3514/5564/7308/MyNorthTicketsLogo.png' end text 'Note: it binds to the button id, not the nested image id.' title 'With text_area preview' file_input preview: :text_area_id, accept: 'text/plain, text/markdown' text_area id: :text_area_id title 'With image and file_name preview' file_input preview: [:text_area_id2, :filename_id], accept: 'text/plain, text/markdown' subtitle2 id: :filename_id text_area id: :text_area_id2 attach :code, file: __FILE__ end end
Version data entries
6 entries across 6 versions & 1 rubygems