feat(ui): Link style `force-underline`

This commit is contained in:
upsiflu 2025-01-03 16:23:42 +01:00
parent 2c078236d7
commit 220a589715
2 changed files with 6 additions and 3 deletions

View File

@ -15,6 +15,7 @@ const props = defineProps<{
round?: true;
autofocus? : boolean
forceUnderline? : true
} & RouterLinkProps
& (ColorProps | DefaultProps)
& VariantProps
@ -47,7 +48,7 @@ onMounted(() => {
$style.link,
round && $style['is-round'],
isIconOnly && $style['is-icon-only'],
isNoColors(props) && $style['force-underline'],
(isNoColors(props) || props.forceUnderline) && $style['force-underline'],
isNoColors(props) && $style['no-spacing'],
]"
:href="isExternalLink ? to.toString() : undefined"

View File

@ -50,12 +50,14 @@ const headerGrid =
ghost thin auto align-self="baseline"
style="grid-column:-1;"
:onClick="props.action.onClick"
>
v-bind="$attrs"
>
{{ props.action.text }}
</Button>
<Link v-if="props.action && 'to' in props.action"
ghost thin auto align-self="baseline"
ghost force-underline thin align-self="baseline"
:to="props.action.to"
v-bind="$attrs"
>
{{ props.action.text }}
</Link>