feat: showLabel

This commit is contained in:
2026-01-30 15:43:37 -05:00
parent 87be06ecea
commit 98e8d971e8

View File

@@ -4,9 +4,10 @@ import type { ButtonProps } from "@nuxt/ui";
type AcfLinkButtonProps = & Omit<ButtonProps, "to" | "target" | "href"> & {
link?: AcfLinkFragment;
showLabel?: boolean;
};
const { link, ...buttonProps } = defineProps<AcfLinkButtonProps>();
const { link, showLabel, ...buttonProps } = defineProps<AcfLinkButtonProps>();
</script>
<template>
@@ -18,6 +19,6 @@ const { link, ...buttonProps } = defineProps<AcfLinkButtonProps>();
:external="link.target === '_blank'"
:rel="link.target === '_blank' ? 'noopener noreferrer' : undefined"
>
<slot>{{ link.title }}</slot>
<slot>{{ showLabel ? link.title : "" }}</slot>
</UButton>
</template>