Skip to content

Commit 5b79f6f

Browse files
committed
Fix modal demo page
1 parent 981dad8 commit 5b79f6f

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

demo/priv/code_examples/modal/async_modal_demo.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ defmodule PrimaWeb.DemoLive.AsyncModalDemo do
1717
id="open-form-modal-button"
1818
type="button"
1919
phx-click={
20-
Prima.Modal.open("demo-form-modal") |> JS.push("open-async-modal", target: @myself)
20+
Prima.Modal.JS.open("demo-form-modal") |> JS.push("open-async-modal", target: @myself)
2121
}
2222
class="inline-flex justify-center rounded-md bg-indigo-600 disabled:bg-gray-400 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"
2323
>
@@ -71,7 +71,7 @@ defmodule PrimaWeb.DemoLive.AsyncModalDemo do
7171
<div class="relative">
7272
<button
7373
class="absolute top-0 right-0"
74-
phx-click={Prima.Modal.close()}
74+
phx-click={Prima.Modal.JS.close()}
7575
testing-ref="close-button"
7676
>
7777
<svg

demo/priv/code_examples/modal/basic_modal.heex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<.button type="button" phx-click={Prima.Modal.open("demo-modal")}>
1+
<.button type="button" phx-click={Prima.Modal.JS.open("demo-modal")}>
22
Open Modal
33
</.button>
44

@@ -26,7 +26,7 @@
2626
<div class="relative">
2727
<button
2828
class="absolute top-0 right-0 cursor-pointer"
29-
phx-click={Prima.Modal.close()}
29+
phx-click={Prima.Modal.JS.close()}
3030
>
3131
<svg
3232
xmlns="http://www.w3.org/2000/svg"
@@ -47,7 +47,7 @@
4747
</p>
4848
</div>
4949
<div class="mt-6">
50-
<.button phx-click={Prima.Modal.close()} type="button">
50+
<.button phx-click={Prima.Modal.JS.close()} type="button">
5151
Got it
5252
</.button>
5353
</div>

demo/priv/code_examples/modal/form_modal_demo.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ defmodule PrimaWeb.DemoLive.FormModalDemo do
2222
id="open-form-demo-button"
2323
type="button"
2424
phx-click={
25-
Prima.Modal.open("form-integration-modal") |> JS.push("open-form-modal", target: @myself)
25+
Prima.Modal.JS.open("form-integration-modal") |> JS.push("open-form-modal", target: @myself)
2626
}
2727
>
2828
Open Modal

demo/priv/code_examples/modal/history_modal.heex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<.button phx-click={JS.patch("/modal/history") |> Prima.Modal.open("demo-history-modal")}>
1+
<.button phx-click={JS.patch("/modal/history") |> Prima.Modal.JS.open("demo-history-modal")}>
22
Open Modal
33
</.button>
44

@@ -75,7 +75,7 @@
7575
</div>
7676
</div>
7777
<div class="mt-5 sm:mt-6">
78-
<.button phx-click={Prima.Modal.close()} type="button" class="w-full">
78+
<.button phx-click={Prima.Modal.JS.close()} type="button" class="w-full">
7979
Go back to dashboard
8080
</.button>
8181
</div>

0 commit comments

Comments
 (0)