Sha256: 219629e7d388b0b19bb6c9b2a21ae634747972c44e4854d8b9472ffc11856438
Contents?: true
Size: 1.25 KB
Versions: 47
Compression:
Stored size: 1.25 KB
Contents
<%= render component_tag(x: {data: x_data("appImagePicker", {src: src}), ":class": "hasImage && 'has-image'"}) do %> <div class="picker-file-name" x-show="hasImage"> <label x-text="name"></label> </div> <div class="picker-uploader" @image-uploader:load="setImage($event.detail.file)" x-ref="uploader"> <%= render Coco::ImageUploader.new( **uploader_args, click: false) do %> <div class="picker-blank-state" x-show="!$parent.src"> <% if blank_state_text? %> <div class="picker-placeholder-text"> <%= blank_state_text %> </div> <% end %> <div class="picker-browse-trigger"> <%= coco_button(theme: :secondary, click: "$parent.openPicker") do %> Browse your files <% end %> </div> </div> <div x-show="$parent.src" x-cloak> <img :src="$parent.src" class="picker-thumbnail"> </div> <% end %> </div> <div class="picker-actions" x-show="hasImage"> <%= coco_button(theme: :text_secondary, icon: :repeat, click: "$parent.replaceImage()") do %> Replace <% end %> <%= coco_button(theme: :text_negative, icon: :trash_2, click: "$parent.clearImage(false)") do %> Delete <% end %> </div> <% end %>
Version data entries
47 entries across 47 versions & 1 rubygems