diff --git a/front/src/components/ui/Link.vue b/front/src/components/ui/Link.vue index cec147db4..8daab6c6c 100644 --- a/front/src/components/ui/Link.vue +++ b/front/src/components/ui/Link.vue @@ -4,8 +4,12 @@ import { type RouterLinkProps, RouterLink } from 'vue-router' import { type ColorProps, type DefaultProps, type VariantProps, propsToColor } from '~/composables/colors'; const { to, icon, thin, round, ...colorProps } = defineProps<{ - icon?: string; + width?: 'standard' | 'auto' | 'full' + alignText?: 'left' | 'center' | 'right' + alignSelf?: 'start' | 'center' | 'end' thin?: true + + icon?: string; round?: true; } & RouterLinkProps & (ColorProps | DefaultProps) & VariantProps>() @@ -24,10 +28,13 @@ const isSimple = propsToColor(colorProps).class === '' v-bind="propsToColor({ ...colorProps, interactive: true })" :class="[ $style.link, + 'is-' + width, + 'is-text-aligned-' + (alignText ?? 'center'), + 'is-self-aligned-' + (alignSelf ?? 'center'), round && $style['is-round'], isIconOnly && $style['is-icon-only'], isSimple && $style['force-underline'], - $style.external + isSimple && $style['no-spacing'], ]" :href="to.toString()" target="_blank" @@ -42,8 +49,12 @@ const isSimple = propsToColor(colorProps).class === '' v-bind="propsToColor({ ...colorProps, interactive: true })" :class="[ $style.link, + 'is-' + width, + 'is-text-aligned-' + (alignText ?? 'center'), + 'is-self-aligned-' + (alignSelf ?? 'center'), round && $style['is-round'], isIconOnly && $style['is-icon-only'], + isSimple && $style['no-spacing'], isSimple && $style['force-underline'] ]" > @@ -56,8 +67,6 @@ const isSimple = propsToColor(colorProps).class === ''