From e6f9157d54913bede36d40d8838951aea10be740 Mon Sep 17 00:00:00 2001 From: Adrian Gruntkowski Date: Thu, 23 Nov 2023 14:06:52 +0100 Subject: [PATCH] Adjust modal button logic --- lib/plausible_web/components/generic.ex | 4 +++- lib/plausible_web/components/two_factor.ex | 4 ++-- .../templates/auth/user_settings.html.heex | 12 ++++++------ 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/lib/plausible_web/components/generic.ex b/lib/plausible_web/components/generic.ex index 02d192d1f..382a7c22b 100644 --- a/lib/plausible_web/components/generic.ex +++ b/lib/plausible_web/components/generic.ex @@ -2,7 +2,7 @@ defmodule PlausibleWeb.Components.Generic do @moduledoc """ Generic reusable components """ - use Phoenix.Component, global_prefixes: ~w(x-) + use Phoenix.Component @notice_themes %{ yellow: %{ @@ -22,6 +22,7 @@ defmodule PlausibleWeb.Components.Generic do attr(:type, :string, default: "button") attr(:class, :string, default: "") attr(:disabled, :boolean, default: false) + attr(:onclick, :string, default: "") attr(:rest, :global) slot(:inner_block) @@ -31,6 +32,7 @@ defmodule PlausibleWeb.Components.Generic do