Sha256: c169824e4e705e8bc3099a94191f49ae9ba58d3c5189fdb8ddf889e159b4b979

Contents?: true

Size: 603 Bytes

Versions: 65

Compression:

Stored size: 603 Bytes

Contents

<%= render component_tag(x: {
  data: "imageUploader({click: #{clickable?.to_json}, drop: #{droppable?.to_json}})",
  "@click.stop": "if (clickable) openPicker()",
  "@dragenter.stop.prevent": "active = true",
  "@dragover.stop.prevent": "active = true",
  "@dragleave.stop.prevent": "active = false",
  "@drop.stop.prevent": "active = false; handleDrop($event)",
  ":data-active": "active && droppable"
}) do %>
  <%= file_field_tag(nil,
    accept: accept,
    class: "uploader-input",
    "x-ref": "input",
    "@click.stop": "",
    "@change": "handleFiles($el.files)") %>
  <%= content %>
<% end %>

Version data entries

65 entries across 65 versions & 1 rubygems

Version Path
coveragebook_components-0.19.8 app/components/coco/images/image_uploader/image_uploader.html.erb
coveragebook_components-0.19.7 app/components/coco/images/image_uploader/image_uploader.html.erb
coveragebook_components-0.19.6 app/components/coco/images/image_uploader/image_uploader.html.erb
coveragebook_components-0.19.5 app/components/coco/images/image_uploader/image_uploader.html.erb
coveragebook_components-0.19.4 app/components/coco/images/image_uploader/image_uploader.html.erb
coveragebook_components-0.19.3 app/components/coco/images/image_uploader/image_uploader.html.erb
coveragebook_components-0.19.2 app/components/coco/images/image_uploader/image_uploader.html.erb
coveragebook_components-0.19.1 app/components/coco/images/image_uploader/image_uploader.html.erb
coveragebook_components-0.19.0 app/components/coco/images/image_uploader/image_uploader.html.erb
coveragebook_components-0.18.8 app/components/coco/images/image_uploader/image_uploader.html.erb
coveragebook_components-0.18.7 app/components/coco/images/image_uploader/image_uploader.html.erb
coveragebook_components-0.18.0 app/components/coco/images/image_uploader/image_uploader.html.erb
coveragebook_components-0.17.7 app/components/coco/images/image_uploader/image_uploader.html.erb
coveragebook_components-0.17.6 app/components/coco/images/image_uploader/image_uploader.html.erb
coveragebook_components-0.17.5 app/components/coco/images/image_uploader/image_uploader.html.erb
coveragebook_components-0.17.4 app/components/coco/images/image_uploader/image_uploader.html.erb
coveragebook_components-0.17.3 app/components/coco/images/image_uploader/image_uploader.html.erb
coveragebook_components-0.17.2 app/components/coco/images/image_uploader/image_uploader.html.erb
coveragebook_components-0.17.1 app/components/coco/images/image_uploader/image_uploader.html.erb
coveragebook_components-0.17.0 app/components/coco/images/image_uploader/image_uploader.html.erb