diff --git a/lib/towerops_web/components/core_components.ex b/lib/towerops_web/components/core_components.ex index 2bbf9c90..d8dd3d53 100644 --- a/lib/towerops_web/components/core_components.ex +++ b/lib/towerops_web/components/core_components.ex @@ -130,12 +130,13 @@ defmodule ToweropsWeb.CoreComponents do """ attr :rest, :global, include: ~w(href navigate patch method download name value disabled) attr :class, :any - attr :variant, :string, values: ~w(primary) + attr :variant, :string, values: ~w(primary danger) slot :inner_block, required: true def button(%{rest: rest} = assigns) do variants = %{ "primary" => "bg-blue-600 text-white hover:bg-blue-700 focus:ring-blue-500 dark:bg-blue-500 dark:hover:bg-blue-600", + "danger" => "bg-red-600 text-white hover:bg-red-700 focus:ring-red-500 dark:bg-red-500 dark:hover:bg-red-600", nil => "bg-white text-zinc-900 ring-1 ring-inset ring-zinc-300 hover:bg-zinc-50 focus:ring-blue-500 dark:bg-zinc-800 dark:text-zinc-100 dark:ring-zinc-700 dark:hover:bg-zinc-700" } diff --git a/lib/towerops_web/live/equipment_live/form.html.heex b/lib/towerops_web/live/equipment_live/form.html.heex index 777b2657..718fb6d4 100644 --- a/lib/towerops_web/live/equipment_live/form.html.heex +++ b/lib/towerops_web/live/equipment_live/form.html.heex @@ -109,7 +109,7 @@ <.button phx-click="delete" data-confirm="Are you sure you want to delete this equipment? All monitoring history and alerts will be permanently deleted." - class="bg-red-600 text-white hover:bg-red-700 focus:ring-red-500 dark:bg-red-500 dark:hover:bg-red-600" + variant="danger" > <.icon name="hero-trash" class="h-4 w-4" /> Delete Equipment diff --git a/lib/towerops_web/live/site_live/form.html.heex b/lib/towerops_web/live/site_live/form.html.heex index 71ac4e5a..ce3fa3c6 100644 --- a/lib/towerops_web/live/site_live/form.html.heex +++ b/lib/towerops_web/live/site_live/form.html.heex @@ -39,7 +39,7 @@ <.button phx-click="delete" data-confirm="Are you sure you want to delete this site? This will also delete all equipment at this site." - class="bg-red-600 text-white hover:bg-red-700 focus:ring-red-500 dark:bg-red-500 dark:hover:bg-red-600" + variant="danger" > <.icon name="hero-trash" class="h-4 w-4" /> Delete Site