add custom button component
Co-authored-by: Esio Freitas <esio.gustavo@gmail.com>
This commit is contained in:
parent
e516bfb31c
commit
fd6bace382
20
src/components/CustomButton.vue
Normal file
20
src/components/CustomButton.vue
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
const props = defineProps({
|
||||||
|
text: String,
|
||||||
|
isDisabled: Boolean
|
||||||
|
})
|
||||||
|
|
||||||
|
const emit = defineEmits(['clicked'])
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<button type="button" class="button" @click="emit('clicked')" v-bind:class="{'opacity-70': isDisabled}" :disabled="isDisabled">
|
||||||
|
{{ text }}
|
||||||
|
</button>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.button {
|
||||||
|
@apply rounded-lg w-full text-base font-semibold text-gray-900 py-4 bg-amber-400;
|
||||||
|
}
|
||||||
|
</style>
|
Loading…
x
Reference in New Issue
Block a user