Class: Flowbite::Input::File

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

Constant Summary collapse

SIZES =
{
  sm: ["text-xs"],
  default: ["text-sm"],
  lg: ["text-lg"]
}.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
# File 'app/components/flowbite/input/file.rb', line 18

def self.styles
  {
    default: Flowbite::Style.new(
      default: ["block", "w-full", "text-gray-900", "border", "border-gray-300", "rounded-lg", "cursor-pointer", "bg-gray-50", "focus:outline-none", "dark:text-gray-400", "dark:bg-gray-700", "dark:border-gray-600"],
      disabled: ["block", "w-full", "text-gray-400", "border", "border-gray-300", "rounded-lg", "cursor-not-allowed", "bg-gray-100", "dark:text-gray-500", "dark:bg-gray-600", "dark:border-gray-500"],
      error: ["block", "w-full", "text-red-900", "border", "border-red-500", "rounded-lg", "cursor-pointer", "bg-red-50", "focus:outline-none", "dark:text-red-400", "dark:bg-gray-700", "dark:border-red-500"]
    )
  }.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