Renders the "Edit" link a host drops into a public page's layout to reach the matching admin page.
Reads plain assigns — no scope check happens here. The gate lives in
PhoenixKitWeb.AdminEditHelper.assign_admin_edit/3, the producer that sets
:admin_edit_url/:admin_edit_label; this component only decides how to
render them, and renders nothing when :url is nil (unauthenticated
visitor, non-admin, or a page nobody called the producer for).
Examples
<.admin_edit_link url={assigns[:admin_edit_url]} label={assigns[:admin_edit_label]} />
<.admin_edit_link
url={assigns[:admin_edit_url]}
label={assigns[:admin_edit_label]}
variant={:menu_item}
/>
Summary
Functions
Renders an edit link into the matching admin page.
Functions
Renders an edit link into the matching admin page.
Attributes
:url— the admin page path. Renders nothing whennil(default).:label— link text. Defaults to gettext "Edit" whennil.:variant—:button(default, a standalone outlined button) or:menu_item(a daisyUImenu<li>, for dropdowns likePhoenixKitWeb.Components.UserDashboardNav.user_dropdown/1).:class— extra classes appended to the variant's base classes.:rest— passed through to the underlying<.link>.
Attributes
url(:string) - Defaults tonil.label(:string) - Defaults tonil.variant(:atom) - Defaults to:button. Must be one of:button, or:menu_item.class(:any) - Defaults tonil.- Global attributes are accepted.