Update the add_button to add_button_link and remove the extra links.

This commit is contained in:
2025-04-27 15:43:14 +03:00
parent ebbee7f9a5
commit ca1c9c05d2
5 changed files with 28 additions and 19 deletions
@@ -17,7 +17,7 @@ defmodule DecentralisedBookIndexWeb.Components.MyComponents do
only: [
success_button: 1,
primary_button: 1,
add_button: 1,
add_button_link: 1,
save_button: 1,
edit_button: 1,
cancel_button: 1
@@ -69,7 +69,7 @@ defmodule DecentralisedBookIndexWeb.Components.MyComponents.Buttons do
slot :inner_block, required: true
def add_button(assigns) do
def add_button_link(assigns) do
~H"""
<.link
class={[
@@ -80,8 +80,22 @@ defmodule DecentralisedBookIndexWeb.Components.MyComponents.Buttons do
]}
{@rest}
>
<svg class="w-6 h-6 text-white dark:text-white" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 12h14m-7 7V5"/>
<svg
class="w-6 h-6 text-white dark:text-white"
aria-hidden="true"
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
fill="none"
viewBox="0 0 24 24"
>
<path
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M5 12h14m-7 7V5"
/>
</svg>
{render_slot(@inner_block)}
</.link>