diff options
| author | Leonardo Bishop <me@leonardobishop.com> | 2024-03-10 01:31:42 +0000 |
|---|---|---|
| committer | Leonardo Bishop <me@leonardobishop.com> | 2024-03-10 01:31:42 +0000 |
| commit | 71e4ad2c71efea471923ea47f01bfda841387f81 (patch) | |
| tree | f08293fdc56b4eb2e3d0e520b79b4d8aad78924c /components/Control/Button.vue | |
| parent | 4495c02c41b95ce6df0c34dbf6ac62f7addae7a3 (diff) | |
Use nuxt auto import magic
Diffstat (limited to 'components/Control/Button.vue')
| -rw-r--r-- | components/Control/Button.vue | 82 |
1 files changed, 0 insertions, 82 deletions
diff --git a/components/Control/Button.vue b/components/Control/Button.vue deleted file mode 100644 index efd91c2..0000000 --- a/components/Control/Button.vue +++ /dev/null @@ -1,82 +0,0 @@ -<script setup lang="ts"> -const props = defineProps({ - type: { - type: String, - required: false, - default: 'text', - }, - label: String, - icon: Array<String>, - disabled: Boolean, -}); - -const emit = defineEmits(['click']); - -const onClick = (event: MouseEvent) => { - if (!props.disabled) { - emit('click', event); - } -}; -</script> - -<template> - <a id="button" :class="{text: type === 'text', solid: type === 'solid', disabled: disabled}" @click.stop="onClick"> - <font-awesome-icon :icon="icon" /> - {{ label }} - </a> -</template> - -<style scoped> -#button { - display: flex; - align-items: center; - gap: 0.25rem; - user-select: none; -} - -.text { - background-color: transparent; - color: var(--color-text-primary); - transition: color 0.3s; - font-weight: 700; - cursor: pointer; - - &.disabled { - color: var(--color-text-mute); - cursor: not-allowed; - } - - &:hover { - color: var(--color-primary-dark); - } - - &.disabled:hover { - color: var(--color-text-mute); - } -} - -.solid { - background-color: var(--color-primary); - transition: background-color 0.3s; - color: var(--color-text); - padding: 0.25rem 0.5rem; - border-radius: 4px; - font-weight: 700; - cursor: pointer; - - &.disabled { - background-color: var(--color-border); - color: var(--color-text-mute); - cursor: not-allowed; - } - - &:hover { - background-color: var(--color-primary-dark); - } - - &.disabled:hover { - background-color: var(--color-border); - } -} - -</style>
\ No newline at end of file |
