🐛 fix: fixed bug

This commit is contained in:
Paul Valerie GOMA 2025-07-21 12:02:52 +02:00
parent 47212b1688
commit b20b694012

View File

@ -2,7 +2,7 @@
import Button from 'primevue/button';
import type IVLink from '@/components/button/IVLink.type';
import { computed } from 'vue';
import styles from '@/assets/typography.module.css'
import styles from '@visua/typography.module.css';
const props = defineProps<IVLink>();
@ -16,25 +16,25 @@ const htmlTag = computed(() => { return props.to ? 'RouterLink' : props.href ? '
</script>
<template>
<Button
variant="link"
role="link"
:label="props.label"
:aria-label="props.label"
:icon="props.icon"
:disabled="props.disabled"
:aria-disabled="props.disabled"
:icon-pos="iconPos"
:as="htmlTag"
:href="props.href"
:target="props.target"
:to="props.to"
:tabindex="props.disabled ? -1 : 0"
@click="props.disabled && $event.preventDefault()"
class="p-button"
:class="[styles['text-body-MD-standard-text-Regular']]"
:style="props.disabled ? { pointerEvents: 'none' } : {}"
/>
<Button
variant="link"
role="link"
:label="props.label"
:aria-label="props.label"
:icon="props.icon"
:disabled="props.disabled"
:aria-disabled="props.disabled"
:icon-pos="iconPos"
:as="htmlTag"
:href="props.href"
:target="props.target"
:to="props.to"
:tabindex="props.disabled ? -1 : 0"
@click="props.disabled && $event.preventDefault()"
class="p-button"
:class="[styles['text-body-MD-standard-text-Regular'], {'disabled': props.disabled}]"
:style="props.disabled ? { pointerEvents: 'none' } : {}"
/>
</template>
<style lang="css" scoped>
@ -44,7 +44,17 @@ const htmlTag = computed(() => { return props.to ? 'RouterLink' : props.href ? '
padding: 0px;
}
.p-button.p-button-link:hover{
border: 2px solid var(--p-button-link-color);
.p-button{
padding: 0px;
gap: calc(var(--p-button-gap)/2);
}
.p-button.disabled{
--p-button-link-color: var(--text-disabled-grey);
--p-button-link-hover-color: var(--text-disabled-grey);
--p-button-link-active-color: var(--text-disabled-grey);
-webkit-user-select: none;
user-select: none;
}
</style>