Skip to content

Commit 68e9717

Browse files
committed
Move combobox demos to code_examples
1 parent 24db830 commit 68e9717

File tree

7 files changed

+14
-47
lines changed

7 files changed

+14
-47
lines changed

lib/prima_web/live/demo_live/combobox_demo.html.heex

Lines changed: 0 additions & 33 deletions
This file was deleted.

lib/prima_web/live/demo_live/combobox_page.html.heex

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
elements.
2727
</p>
2828

29-
<div class="not-prose bg-white border border-gray-200 rounded-lg p-6 my-6">
30-
<.basic_combobox_demo {assigns} />
29+
<div class="not-prose">
30+
<.code_example file="combobox/basic.html.heex" id="basic-combobox-demo" />
3131
</div>
3232

3333
<p>
@@ -45,8 +45,8 @@
4545
The component automatically switches to async mode with debounced search queries.
4646
</p>
4747

48-
<div class="not-prose bg-white border border-gray-200 rounded-lg p-6 my-6">
49-
<.live_component module={PrimaWeb.DemoLive.AsyncComboboxDemo} id="async-combobox-demo" />
48+
<div class="not-prose">
49+
<.code_example module={PrimaWeb.DemoLive.AsyncComboboxDemo} id="async-combobox-demo" />
5050
</div>
5151

5252
<p>
@@ -63,8 +63,8 @@
6363
Perfect for tags, categories, or any user-generated content scenarios.
6464
</p>
6565

66-
<div class="not-prose bg-white border border-gray-200 rounded-lg p-6 my-6">
67-
<.creatable_combobox_demo {assigns} />
66+
<div class="not-prose">
67+
<.code_example file="combobox/creatable.html.heex" id="creatable-combobox-demo" />
6868
</div>
6969

7070
<p>
@@ -79,8 +79,8 @@
7979
component to display selected items as removable pills.
8080
</p>
8181

82-
<div class="not-prose bg-white border border-gray-200 rounded-lg p-6 my-6">
83-
<.multi_select_combobox_demo {assigns} />
82+
<div class="not-prose">
83+
<.code_example file="combobox/multi_select.html.heex" id="multi-select-combobox-demo" />
8484
</div>
8585

8686
<p>
@@ -107,8 +107,8 @@
107107
It automatically flips to the opposite side when there's insufficient space.
108108
</p>
109109

110-
<div class="not-prose bg-white border border-gray-200 rounded-lg p-6 my-6">
111-
<.positioned_combobox_demo />
110+
<div class="not-prose">
111+
<.code_example file="combobox/positioned.html.heex" id="positioned-combobox-demo" />
112112
</div>
113113

114114
<p>
@@ -122,8 +122,8 @@
122122
The component is completely unstyled, giving you full control over the visual presentation.
123123
</p>
124124

125-
<div class="not-prose bg-white border border-gray-200 rounded-lg p-6 my-6">
126-
<.flexible_markup_demo {assigns} />
125+
<div class="not-prose">
126+
<.code_example file="combobox/flexible_markup.html.heex" id="flexible-markup-combobox-demo" />
127127
</div>
128128

129129
<p>
File renamed without changes.

lib/prima_web/live/demo_live/creatable_combobox_demo.html.heex renamed to priv/code_examples/combobox/creatable.html.heex

File renamed without changes.

lib/prima_web/live/demo_live/flexible_markup_demo.html.heex renamed to priv/code_examples/combobox/flexible_markup.html.heex

File renamed without changes.

lib/prima_web/live/demo_live/multi_select_combobox_demo.html.heex renamed to priv/code_examples/combobox/multi_select.html.heex

File renamed without changes.

lib/prima_web/live/demo_live/positioned_combobox_demo.html.heex renamed to priv/code_examples/combobox/positioned.html.heex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
</.combobox_options>
3535
</.combobox>
3636
</div>
37-
37+
3838
<!-- Right Placement -->
3939
<div>
4040
<label class="block text-sm font-medium text-gray-700 mb-2">Color (opens to right)</label>
@@ -71,7 +71,7 @@
7171
</.combobox_options>
7272
</.combobox>
7373
</div>
74-
74+
7575
<!-- Bottom with Large Offset -->
7676
<div>
7777
<label class="block text-sm font-medium text-gray-700 mb-2">Country (12px offset)</label>

0 commit comments

Comments
 (0)