Files
WRNexusJS/packages/ui/components/SignInLink.wrn
T

30 lines
1.4 KiB
Plaintext

component SignInLink {
props {
label = "Sign in with password"
description = "Use your username or email and password"
href = ""
type = "button"
variant = "secondary"
disabled = false
icon = "icon-[lucide--lock-keyhole]"
class = ""
}
view {
<span class="wire-catalog-action wire-auth-action {class}">
{#if href}
<a href="{href}" class="wire-btn wire-btn--{variant}">
<span class="wire-auth-action__icon"><span class="{icon} size-5" aria-hidden="true"></span></span>
<span class="wire-auth-action__copy"><span class="wire-auth-action__label">{label}</span>{#if description}<span class="wire-auth-action__description">{description}</span>{/if}</span>
<span class="icon-[lucide--chevron-right] wire-auth-action__arrow" aria-hidden="true"></span>
</a>
{:else}
<button type="{type}" disabled="{disabled}" class="wire-btn wire-btn--{variant}">
<span class="wire-auth-action__icon"><span class="{icon} size-5" aria-hidden="true"></span></span>
<span class="wire-auth-action__copy"><span class="wire-auth-action__label">{label}</span>{#if description}<span class="wire-auth-action__description">{description}</span>{/if}</span>
<span class="icon-[lucide--chevron-right] wire-auth-action__arrow" aria-hidden="true"></span>
</button>
{/if}
</span>
}
}