Class: Flowbite::Input::File

Inherits:
Field
  • Object
show all
Defined in:
app/components/flowbite/input/file.rb

Constant Summary collapse

SIZES =
{
  sm: ["text-sm"],
  default: ["text-sm"],
  lg: ["text-base"]
}.freeze

Constants inherited from Field

Flowbite::Input::Field::STATES

Instance Attribute Summary

Attributes inherited from Field

#options, #size, #style

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Field

#call, #classes, classes, #initialize, sizes

Constructor Details

This class inherits a constructor from Flowbite::Input::Field

Class Method Details

.stylesObject

rubocop:disable Layout/LineLength



18
19
20
21
22
23
24
25
26
27
28
# File 'app/components/flowbite/input/file.rb', line 18

def self.styles
  Flowbite::Styles.from_hash(
    {
      default: {
        default: ["block", "w-full", "text-heading", "border", "border-default-medium", "rounded-base", "cursor-pointer", "bg-neutral-secondary-medium", "focus:outline-none"],
        disabled: ["block", "w-full", "text-fg-disabled", "border", "border-default-medium", "rounded-base", "cursor-not-allowed", "bg-neutral-secondary-medium"],
        error: ["block", "w-full", "text-fg-danger-strong", "border", "border-danger-subtle", "rounded-base", "cursor-pointer", "bg-danger-soft", "focus:outline-none"]
      }
    }.freeze
  )
end

Instance Method Details

#input_field_typeObject

Returns the name of the method used to generate HTML for the input field



13
14
15
# File 'app/components/flowbite/input/file.rb', line 13

def input_field_type
  :file_field
end