Sha256: 4b38cb0a947515ca9ff5b642d7c94f5811d1fa6afc83d86287fac53fdaa26f30
Contents?: true
Size: 836 Bytes
Versions: 12
Compression:
Stored size: 836 Bytes
Contents
module Coprl module Presenters module DSL module Components class FileInput < Input include Mixins::Append include Mixins::Buttons include Mixins::Grids attr_reader :accept, :preview, :components def initialize(**attribs_, &block) super(type: :file_input, **attribs_, &block) @accept = attribs.delete(:accept) { nil } @preview = attribs.delete(:preview) { nil } @components = [] expand! default_button end def value(value=nil) return @value if locked? @value = value end private def default_button button(icon: :cloud_upload) unless components.any? end end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems