See PhenixStorybook.Components.Modal.ModalHeader on how to configure target.
<.button phx-click={JS.push("psb-assign", value: %{show: true})} text="Open me"/> <.modal id="modal-single-default" close_modal_event={JS.push("psb-assign", value: %{show: false, variation_id: :default})} overlay_close > <.modal_header title="Fancy title with icon" icon="fas fa-bullhorn" close_modal_event={JS.push("psb-assign", value: %{show: false, variation_id: :default})} /> <.modal_body class="text-center"> <p class="text-default-txt"> Some modal content here </p> </.modal_body> <.modal_footer> <.button text="Valider"/> </.modal_footer> </.modal>
<.button phx-click={JS.push("psb-assign", value: %{show: true})} text="Open me"/> <.modal id="modal-single-minimal-modal" close_modal_event={JS.push("psb-assign", value: %{show: false, variation_id: :minimal_modal})} overlay_close > <.modal_header close_modal_event={JS.push("psb-assign", value: %{show: false, variation_id: :minimal_modal})} /> <.modal_body class="text-center"> <p class="text-default-txt"> Some modal content here </p> </.modal_body> </.modal>
<.button phx-click={JS.push("psb-assign", value: %{show: true})} text="Open me"/> <.modal id="modal-single-full-screen-modal" full_screen close_modal_event={JS.push("psb-assign", value: %{show: false, variation_id: :full_screen_modal})} overlay_close > <.modal_header title="Fancy title with icon" icon="fas fa-bullhorn" full_screen={true} close_modal_event={JS.push("psb-assign", value: %{show: false, variation_id: :full_screen_modal})} /> <.modal_body class="text-center" full_screen={true}> <p class="text-default-txt"> Some modal content here </p> </.modal_body> <.modal_footer full_screen={true}> <.button text="Valider"/> </.modal_footer> </.modal>