File tree Expand file tree Collapse file tree 1 file changed +12
-10
lines changed
src/Frontend/src/components Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change 11<script setup lang="ts">
22import FAIcon from " @/components/FAIcon.vue" ;
3- import { IconDefinition } from " @fortawesome/free-solid-svg-icons" ;
3+ import { IconDefinition , faRefresh } from " @fortawesome/free-solid-svg-icons" ;
44
55export type ButtonVariant = " primary" | " secondary" | " danger" | " link" | " default" ;
66export type ButtonSize = " sm" | " lg" | " default" ;
@@ -39,21 +39,23 @@ const sizeClasses = {
3939 lg: " btn-lg" ,
4040 default: " " ,
4141};
42-
43- const buttonClasses = [" btn" , variantClasses [props .variant ], sizeClasses [props .size ]].filter (Boolean ).join (" " );
4442 </script >
4543
4644<template >
47- <button :class =" [buttonClasses, { disabled: disabled || loading }]" :disabled =" disabled || loading" :type =" type" :aria-label =" ariaLabel" v-tippy =" tooltip" >
48- <FAIcon v-if =" icon && iconPosition === 'left' && !loading" :icon =" icon" class =" icon-left" />
49-
50- <i v-if =" loading" class =" glyphicon glyphicon-refresh rotate" ></i >
51-
45+ <button
46+ class =" btn"
47+ :class =" [variantClasses[props.variant], sizeClasses[props.size], { disabled: props.disabled || props.loading }]"
48+ :disabled =" props.disabled || props.loading"
49+ :type =" props.type"
50+ :aria-label =" props.ariaLabel"
51+ v-tippy =" props.tooltip"
52+ >
53+ <FAIcon v-if =" props.icon && props.iconPosition === 'left' && !props.loading" :icon =" props.icon" class =" icon-left" />
54+ <FAIcon v-if =" props.loading" class =" rotate" :icon =" faRefresh" />
5255 <span v-if =" $slots.default" class =" button-text" >
5356 <slot />
5457 </span >
55-
56- <FAIcon v-if =" icon && iconPosition === 'right' && !loading" :icon =" icon" class =" icon-right" />
58+ <FAIcon v-if =" props.icon && props.iconPosition === 'right' && !props.loading" :icon =" props.icon" class =" icon-right" />
5759 </button >
5860</template >
5961
You can’t perform that action at this time.
0 commit comments