Skip to content

Commit 0a582cd

Browse files
committed
Add checked classes for COMBOBOX + RADIO_BUTTON
1 parent 6ae5f91 commit 0a582cd

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

lib/ruby_ui/checkbox/checkbox.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ def default_attrs
1919
class: [
2020
"peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background accent-primary",
2121
"disabled:cursor-not-allowed disabled:opacity-50",
22+
"checked:bg-primary checked:text-primary-foreground",
2223
"aria-disabled:cursor-not-allowed aria-disabled:opacity-50 aria-disabled:pointer-events-none",
2324
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"
2425
]

lib/ruby_ui/combobox/combobox_checkbox.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ def default_attrs
1414
"peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background accent-primary",
1515
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
1616
"disabled:cursor-not-allowed disabled:opacity-50",
17+
"checked:bg-primary checked:text-primary-foreground",
1718
"aria-disabled:cursor-not-allowed aria-disabled:opacity-50 aria-disabled:pointer-events-none"
1819
],
1920
data: {

lib/ruby_ui/radio_button/radio_button.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ def default_attrs
1818
class: [
1919
"h-4 w-4 p-0 border-primary rounded-full flex-none",
2020
"disabled:cursor-not-allowed disabled:opacity-50",
21+
"checked:bg-primary checked:text-primary-foreground",
2122
"aria-disabled:cursor-not-allowed aria-disabled:opacity-50 aria-disabled:pointer-events-none"
2223
]
2324
}

0 commit comments

Comments
 (0)