b34b0dd7d6
Validators (Pushes and Pull Requests) / UI & Storage Validation (pull_request) Failing after 12s
Validators (Pushes and Pull Requests) / Database & Schema Validation (pull_request) Successful in 13s
Validators (Pushes and Pull Requests) / Core Validators & Database Setup (pull_request) Failing after 28s
Validators (Pushes and Pull Requests) / WBS & Audit Validations (pull_request) Has been skipped
Validators (Pushes and Pull Requests) / .NET Contracts (pull_request) Has been skipped
Validators (Pushes and Pull Requests) / Calibration & Performance (pull_request) Has been skipped
Validators (Pushes and Pull Requests) / Operational Report & Decision Packet (pull_request) Has been skipped
Validators (Pushes and Pull Requests) / CI Workflow Lint (pull_request) Failing after 10s
Validators (Pushes and Pull Requests) / Security & Secrets (pull_request) Successful in 12s
Validators (Pushes and Pull Requests) / Notify PR Results (pull_request) Successful in 2s
Frontend CI Pipeline / ci-frontend-8-steps (pull_request) Failing after 2m50s
64 lines
1.1 KiB
Vue
64 lines
1.1 KiB
Vue
<template>
|
|
<button
|
|
:class="['btn', `btn-${variant}`, sizeClass, { disabled }]"
|
|
:disabled="disabled || loading"
|
|
:aria-label="ariaLabel"
|
|
@click="$emit('click')"
|
|
>
|
|
<span v-if="loading" class="spinner-border spinner-border-sm me-2"></span>
|
|
<slot />
|
|
</button>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { computed } from 'vue'
|
|
|
|
interface Props {
|
|
variant?: 'primary' | 'secondary' | 'danger' | 'success' | 'warning' | 'info'
|
|
size?: 'sm' | 'md' | 'lg'
|
|
disabled?: boolean
|
|
loading?: boolean
|
|
ariaLabel?: string
|
|
}
|
|
|
|
const props = withDefaults(defineProps<Props>(), {
|
|
variant: 'primary',
|
|
size: 'md',
|
|
disabled: false,
|
|
loading: false
|
|
})
|
|
|
|
const sizeClass = computed(() => {
|
|
switch (props.size) {
|
|
case 'sm':
|
|
return 'btn-sm'
|
|
case 'lg':
|
|
return 'btn-lg'
|
|
default:
|
|
return ''
|
|
}
|
|
})
|
|
|
|
defineEmits<{
|
|
click: []
|
|
}>()
|
|
</script>
|
|
|
|
<style scoped>
|
|
.btn {
|
|
border-radius: 6px;
|
|
font-weight: 500;
|
|
transition: all 0.2s ease-in-out;
|
|
}
|
|
|
|
.btn:focus-visible {
|
|
outline: 2px solid #0d6efd;
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
.btn:disabled {
|
|
cursor: not-allowed;
|
|
opacity: 0.65;
|
|
}
|
|
</style>
|