File tree Expand file tree Collapse file tree 2 files changed +29
-1
lines changed Expand file tree Collapse file tree 2 files changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,13 @@ def default_attrs
21
21
action : "click->ruby-ui--tabs#show" ,
22
22
value : @value
23
23
} ,
24
- class : "inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow"
24
+ class : [
25
+ "inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all" ,
26
+ "disabled:pointer-events-none disabled:opacity-50" ,
27
+ "aria-disabled:pointer-events-none aria-disabled:opacity-50 aria-disabled:cursor-not-allowed" ,
28
+ "data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow" ,
29
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"
30
+ ]
25
31
}
26
32
end
27
33
end
Original file line number Diff line number Diff line change @@ -38,6 +38,28 @@ def view_template
38
38
RUBY
39
39
end
40
40
41
+ render Docs ::VisualCodeExample . new ( title : "Disabled" , context : self ) do
42
+ <<~RUBY
43
+ Tabs(default_value: "account", class: 'w-96') do
44
+ TabsList do
45
+ TabsTrigger(disabled: true, value: "account") { "Account" }
46
+ TabsTrigger(disabled: true, value: "password") { "Password" }
47
+ end
48
+ end
49
+ RUBY
50
+ end
51
+
52
+ render Docs ::VisualCodeExample . new ( title : "Aria Disabled" , context : self ) do
53
+ <<~RUBY
54
+ Tabs(default_value: "account", class: 'w-96') do
55
+ TabsList do
56
+ TabsTrigger(aria: {disabled: "true"}, value: "account") { "Account" }
57
+ TabsTrigger(aria: {disabled: "true"}, value: "password") { "Password" }
58
+ end
59
+ end
60
+ RUBY
61
+ end
62
+
41
63
render Docs ::VisualCodeExample . new ( title : "Full width" , context : self ) do
42
64
<<~RUBY
43
65
Tabs(default_value: "overview", class: 'w-96') do
You can’t perform that action at this time.
0 commit comments