File size: 544 Bytes
24d78ad |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
defmodule Storybook.CoreComponents.Modal do
use PhoenixStorybook.Story, :component
alias MedicalTranscriptionWeb.CoreComponents
def function, do: &CoreComponents.modal/1
def imports, do: [{CoreComponents, [button: 1, hide_modal: 1, show_modal: 1]}]
def template do
"""
<.button phx-click={show_modal(":variation_id")} psb-code-hidden>
Open modal
</.button>
<.psb-variation/>
"""
end
def variations do
[
%Variation{
id: :default,
slots: ["Modal body"]
}
]
end
end
|