Sha256: c9ed5580337788254f639e160d297eff119201de51ece71c7ed7e1ca90f82a36
Contents?: true
Size: 584 Bytes
Versions: 47
Compression:
Stored size: 584 Bytes
Contents
module Coco module App module Elements class ImagePicker < Coco::Component include Concerns::AcceptsOptions include Coco::AppHelper accepts_option :size, from: [:sm, :md, nil], default: :sm renders_one :blank_state_text before_render do args[:resize]&.each { set_tag_data_attr("size-#{_1}", _2) } end attr_reader :uploader_args, :src def initialize(src: nil, accept: "image/*", **kwargs) @src = src @uploader_args = {accept: accept} end end end end end
Version data entries
47 entries across 47 versions & 1 rubygems