yale-user-access/packages/frontend/components/yale/Button.vue
Liam Pietralla f577617b4d
All checks were successful
Build and Publish / Build Yale Access Backend (push) Successful in 28s
Build and Publish / Build Yale Access Frontend (push) Successful in 47s
Build and Publish / Push Yale Access Backend Docker Image (push) Successful in 9s
Build and Publish / Push Yale Access Frontend Docker Image (push) Successful in 10s
initial commit
2025-01-10 08:37:18 +11:00

28 lines
621 B
Vue

<script setup lang="ts">
import type { HTMLButtonTypes } from '~/types/html-input-types';
interface ButtonProps {
type?: HTMLButtonTypes
disabled?: boolean
}
const props = withDefaults(defineProps<ButtonProps>(), {
type: 'button',
disabled: false
})
const emit = defineEmits([
'click'
])
const handleClick = () => {
emit('click');
}
</script>
<template>
<button :type="props.type" :disabled="props.disabled" class="bg-stone-950 hover:bg-stone-900 p-2 rounded-md disabled:opacity-50 disabled:cursor-not-allowed"
@click="handleClick">
<slot></slot>
</button>
</template>