Some checks failed
Auto Tag Develop / tag (push) Has been cancelled
| Numéro du ticket | Titre du ticket | |------------------|-----------------| | #352 | modification front admin fournisseur | ## Description de la PR ## Modification du .env ## Check list - [x] Pas de régression - [ ] TU/TI/TF rédigée - [x] TU/TI/TF OK - [x] CHANGELOG modifié Reviewed-on: #35 Reviewed-by: Autin <tristan@yuno.malio.fr> Co-authored-by: sroy <sebastien@yuno.malio.fr> Co-committed-by: sroy <sebastien@yuno.malio.fr>
40 lines
913 B
Vue
40 lines
913 B
Vue
<template>
|
|
<component
|
|
:is="'button'"
|
|
:type="type"
|
|
:disabled="isDisabled"
|
|
class="inline-flex min-w-[194px] items-center justify-center rounded-md"
|
|
:class="[
|
|
isDisabled ? 'cursor-not-allowed opacity-60' : 'cursor-pointer',
|
|
buttonClass
|
|
]"
|
|
v-bind="attrs"
|
|
>
|
|
<slot v-if="!loading" />
|
|
<UiLoadingDots v-else />
|
|
</component>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import {computed, useAttrs} from 'vue'
|
|
|
|
defineOptions({inheritAttrs: false})
|
|
|
|
const props = withDefaults(
|
|
defineProps<{
|
|
type?: 'button' | 'submit' | 'reset'
|
|
disabled?: boolean
|
|
loading?: boolean
|
|
buttonClass?: string
|
|
}>(),
|
|
{
|
|
disabled: false,
|
|
loading: false,
|
|
buttonClass: ''
|
|
}
|
|
)
|
|
|
|
const attrs = useAttrs()
|
|
const isDisabled = computed(() => props.disabled || props.loading)
|
|
</script>
|