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.16.0 app/components/coco/images/image_uploader/image_uploader.html.erb
coveragebook_components-0.15.0 app/components/coco/images/image_uploader/image_uploader.html.erb
coveragebook_components-0.14.0 app/components/coco/images/image_uploader/image_uploader.html.erb
coveragebook_components-0.13.1 app/components/coco/images/image_uploader/image_uploader.html.erb
coveragebook_components-0.13.0 app/components/coco/images/image_uploader/image_uploader.html.erb
coveragebook_components-0.12.2 app/components/coco/shared/image_uploader/image_uploader.html.erb
coveragebook_components-0.12.1 app/components/coco/shared/image_uploader/image_uploader.html.erb
coveragebook_components-0.12.0 app/components/coco/shared/image_uploader/image_uploader.html.erb
coveragebook_components-0.11.0 app/components/coco/shared/image_uploader/image_uploader.html.erb
coveragebook_components-0.10.1.beta.2 app/components/coco/shared/image_uploader/image_uploader.html.erb
coveragebook_components-0.10.1.beta.1 app/components/coco/shared/image_uploader/image_uploader.html.erb
coveragebook_components-0.10.1.beta.0 app/components/coco/shared/image_uploader/image_uploader.html.erb
coveragebook_components-0.10.0 app/components/coco/base/image_uploader/image_uploader.html.erb
coveragebook_components-0.9.1 app/components/coco/base/image_uploader/image_uploader.html.erb
coveragebook_components-0.9.0 app/components/coco/base/image_uploader/image_uploader.html.erb
coveragebook_components-0.8.9 app/components/coco/base/image_uploader/image_uploader.html.erb
coveragebook_components-0.8.8 app/components/coco/base/image_uploader/image_uploader.html.erb
coveragebook_components-0.8.7 app/components/coco/base/image_uploader/image_uploader.html.erb
coveragebook_components-0.8.6 app/components/coco/base/image_uploader/image_uploader.html.erb
coveragebook_components-0.8.5 app/components/coco/base/image_uploader/image_uploader.html.erb