-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfile.rb
More file actions
32 lines (29 loc) · 1.08 KB
/
file.rb
File metadata and controls
32 lines (29 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# frozen_string_literal: true
module Flowbite
class Input
class File < Input
SIZES = {
sm: ["text-sm"],
default: ["text-sm"],
lg: ["text-base"]
}.freeze
# Returns the name of the method used to generate HTML for the input field
def input_field_type
:file_field
end
# rubocop:disable Layout/LineLength
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
# rubocop:enable Layout/LineLength
end
end
end