Skip to content

Commit 1a06163

Browse files
committed
add target and rel attrs to maybe_link
1 parent 73bc8ea commit 1a06163

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

lib/algora_web/components/core_components.ex

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1288,12 +1288,21 @@ defmodule AlgoraWeb.CoreComponents do
12881288
attr :navigate, :string, default: nil
12891289
attr :patch, :string, default: nil
12901290
attr :replace, :boolean, default: false
1291+
attr :target, :string, default: nil
1292+
attr :rel, :string, default: nil
12911293
slot :inner_block
12921294

12931295
def maybe_link(assigns) do
12941296
~H"""
12951297
<%= if link?(assigns) do %>
1296-
<.link href={@href} navigate={@navigate} patch={@patch} replace={@replace}>
1298+
<.link
1299+
href={@href}
1300+
navigate={@navigate}
1301+
patch={@patch}
1302+
replace={@replace}
1303+
target={@target}
1304+
rel={@rel}
1305+
>
12971306
{render_slot(@inner_block)}
12981307
</.link>
12991308
<% else %>

0 commit comments

Comments
 (0)