File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,6 +31,28 @@ def view_template
3131 RUBY
3232 end
3333
34+ render Docs ::VisualCodeExample . new ( title : "Pre-selected Item" , context : self ) do
35+ <<~RUBY
36+ Select(class: "w-56") do
37+ SelectInput(value: "banana", id: "select-preselected-fruit")
38+
39+ SelectTrigger do
40+ SelectValue(placeholder: "Select a fruit", id: "select-preselected-fruit") { "Banana" }
41+ end
42+
43+ SelectContent(outlet_id: "select-preselected-fruit") do
44+ SelectGroup do
45+ SelectLabel { "Fruits" }
46+ SelectItem(value: "apple") { "Apple" }
47+ SelectItem(value: "orange") { "Orange" }
48+ SelectItem(value: "banana") { "Banana" }
49+ SelectItem(value: "watermelon") { "Watermelon" }
50+ end
51+ end
52+ end
53+ RUBY
54+ end
55+
3456 render Docs ::VisualCodeExample . new ( title : "Disabled" , context : self ) do
3557 <<~RUBY
3658 Select(class: "w-56") do
You can’t perform that action at this time.
0 commit comments