refactor: move component to share component
This commit is contained in:
parent
06fa3ab9ac
commit
d9b48c0e1f
3 changed files with 4 additions and 4 deletions
40
src/components/AddButton.vue
Normal file
40
src/components/AddButton.vue
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
<script setup lang="ts">
|
||||
defineProps<{
|
||||
label?: string;
|
||||
}>();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="column items-center box" :class="{ dark: $q.dark.isActive }">
|
||||
<div class="row">
|
||||
<q-btn
|
||||
unelevated
|
||||
@click="$emit('trigger')"
|
||||
size="lg"
|
||||
class="color-btn"
|
||||
icon="mdi-plus"
|
||||
round
|
||||
/>
|
||||
</div>
|
||||
<div class="row q-mt-sm color-text" v-if="label">{{ $t(label) }}</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.box {
|
||||
--_btn-add-color: var(--cyan-6-hsl);
|
||||
|
||||
.color-btn {
|
||||
color: hsl(var(--_btn-add-color));
|
||||
background: hsla(var(--_btn-add-color) / 0.1) !important;
|
||||
}
|
||||
|
||||
.color-text {
|
||||
color: var(--stone-6);
|
||||
}
|
||||
|
||||
&.dark {
|
||||
--_btn-add-color: var(--cyan-5-hsl);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Loading…
Add table
Add a link
Reference in a new issue