module Coco class ImagePicker < Coco::Component include Concerns::AcceptsOptions 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