From f3771c97c0aeffc73324d57f52b7bdc42df392b9 Mon Sep 17 00:00:00 2001 From: Claudio Ortolina Date: Mon, 12 May 2025 21:48:24 +0100 Subject: [PATCH] Use Fluxon modal --- .../components/core_components.ex | 80 +------------------ .../live/artist_live/show.html.heex | 5 +- .../live/collection_live/index.html.heex | 15 ++-- .../live/collection_live/show.html.heex | 4 +- .../live/wishlist_live/index.html.heex | 10 ++- .../live/wishlist_live/show.html.heex | 5 +- 6 files changed, 24 insertions(+), 95 deletions(-) diff --git a/lib/music_library_web/components/core_components.ex b/lib/music_library_web/components/core_components.ex index 4bc88b1d..d41060d0 100644 --- a/lib/music_library_web/components/core_components.ex +++ b/lib/music_library_web/components/core_components.ex @@ -23,89 +23,11 @@ defmodule MusicLibraryWeb.CoreComponents do defdelegate date_time_picker(assigns), to: Fluxon.Components.DatePicker defdelegate input(assigns), to: Fluxon.Components.Input defdelegate loading(assigns), to: Fluxon.Components.Loading + defdelegate modal(assigns), to: Fluxon.Components.Modal defdelegate select(assigns), to: Fluxon.Components.Select defdelegate separator(assigns), to: Fluxon.Components.Separator defdelegate sheet(assigns), to: Fluxon.Components.Sheet - @doc """ - Renders a modal. - - ## Examples - - <.modal id="confirm-modal"> - This is a modal. - - - JS commands may be passed to the `:on_cancel` to configure - the closing/cancel event, for example: - - <.modal id="confirm" on_cancel={JS.navigate(~p"/posts")}> - This is another modal. - - - """ - attr :id, :string, required: true - attr :show, :boolean, default: false - attr :on_cancel, JS, default: %JS{} - slot :inner_block, required: true - - def modal(assigns) do - ~H""" -