Sha256: ae43adad16e8b0d85e03ec5f0e7617dae26f1d7c25c48b5129748c2548021b89

Contents?: true

Size: 901 Bytes

Versions: 9

Compression:

Stored size: 901 Bytes

Contents

# frozen_string_literal: true

module Playbook
  module PbFileUpload
    class FileUpload < Playbook::KitBase
      prop :accept, type: Playbook::Props::String,
                    default: ""

      prop :files, type: Playbook::Props::Array,
                   default: []

      prop :label, type: Playbook::Props::String,
                   default: "Upload File"

      prop :placeholder, type: Playbook::Props::String,
                         default: "No file"

      prop :full_width, type: Playbook::Props::Boolean,
                        default: false

      prop :input_options, type: Playbook::Props::Hash,
                           default: {}

      def classname
        file_upload_class = generate_classname("pb_file_upload_kit")
        file_upload_class + full_width_class
      end

      def full_width_class
        full_width ? " full_width" : ""
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
playbook_ui-13.5.0.pre.alpha.PLAY823globalpropoverflow1191 app/pb_kits/playbook/pb_file_upload/file_upload.rb
playbook_ui-13.5.0.pre.alpha.PLAY823globalpropoverflow1188 app/pb_kits/playbook/pb_file_upload/file_upload.rb
playbook_ui-13.5.0 app/pb_kits/playbook/pb_file_upload/file_upload.rb
playbook_ui-13.4.0.pre.alpha.play961turnoffdeprecationwarnings1171 app/pb_kits/playbook/pb_file_upload/file_upload.rb
playbook_ui-13.4.0 app/pb_kits/playbook/pb_file_upload/file_upload.rb
playbook_ui-13.3.0 app/pb_kits/playbook/pb_file_upload/file_upload.rb
playbook_ui-13.2.0.pre.alpha.PLAY986dateTimeRounding1150 app/pb_kits/playbook/pb_file_upload/file_upload.rb
playbook_ui-13.2.0 app/pb_kits/playbook/pb_file_upload/file_upload.rb
playbook_ui-13.1.0 app/pb_kits/playbook/pb_file_upload/file_upload.rb