File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed
components/ruby_ui/radio_button Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,8 @@ def default_attrs
17
17
} ,
18
18
class : [
19
19
"h-4 w-4 p-0 border-primary rounded-full flex-none" ,
20
- "disabled:cursor-not-allowed disabled:opacity-50"
20
+ "disabled:cursor-not-allowed disabled:opacity-50" ,
21
+ "aria-disabled:cursor-not-allowed aria-disabled:opacity-50 aria-disabled:pointer-events-none"
21
22
]
22
23
}
23
24
end
Original file line number Diff line number Diff line change @@ -27,6 +27,24 @@ def view_template
27
27
RUBY
28
28
end
29
29
30
+ render Docs ::VisualCodeExample . new ( title : "Disabled" , context : self ) do
31
+ <<~RUBY
32
+ div(class: "flex flex-row items-center gap-2") do
33
+ RadioButton(class: "peer",id: "disabled", disabled: true)
34
+ FormFieldLabel(for: "disabled") { "Disabled" }
35
+ end
36
+ RUBY
37
+ end
38
+
39
+ render Docs ::VisualCodeExample . new ( title : "Aria Disabled" , context : self ) do
40
+ <<~RUBY
41
+ div(class: "flex flex-row items-center gap-2") do
42
+ RadioButton(class: "peer", id: "aria-disabled", aria: {disabled: "true"})
43
+ FormFieldLabel(for: "aria-disabled") { "Aria Disabled" }
44
+ end
45
+ RUBY
46
+ end
47
+
30
48
render Components ::ComponentSetup ::Tabs . new ( component_name : component )
31
49
32
50
render Docs ::ComponentsTable . new ( component_files ( component ) )
You can’t perform that action at this time.
0 commit comments