Skip to content

Commit

Permalink
Update dark mode styling on date field
Browse files Browse the repository at this point in the history
  • Loading branch information
joelzwarrington committed Jan 14, 2025
1 parent 309198f commit 53e1b35
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions lib/atomic_view/components/date_field_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@ module Components
class DateFieldComponent < ViewComponent::Form::DateFieldComponent
def html_class
class_names(
*%W[block w-full h-9 min-w-0 flex-1 rounded-md border-0 py-1 text-sm shadow-sm ring-1],
"disabled:cursor-not-allowed disabled:bg-gray-50 disabled:text-gray-500 disabled:ring-gray-200",
"text-gray-900 ring-gray-300 placeholder:text-gray-400 focus:ring-neutral-700",
"text-red-900 ring-red-300 placeholder:text-red-300 focus:ring-red-500" => method_errors?
class_names(
*%W[block w-full h-9 min-w-0 flex-1 rounded-md border-0 py-1 text-sm shadow-sm ring-1],
"disabled:cursor-not-allowed disabled:bg-gray-50 disabled:text-zinc-500 disabled:ring-zinc-200",
"bg-transparent dark:bg-white/5 text-zinc-950 ring-zinc-950/10 dark:ring-white/10 placeholder:text-zinc-500 dark:text-white focus:ring-neutral-700 focus:border-zinc-950/20 dark:focus:ring-white/20",
"text-red-900 ring-red-300 placeholder:text-red-300 focus:ring-red-500" => method_errors?,
),
options[:class]
)
end
end
Expand Down

0 comments on commit 53e1b35

Please sign in to comment.