Mostly finished the button for the custom dropdown component. Just need to update the text displayed to reflect the current selection.

This commit is contained in:
ajdj100
2023-05-18 23:13:51 -04:00
parent babb36f048
commit 0cdd98fa99
5 changed files with 34 additions and 7 deletions

View File

@@ -1,6 +1,7 @@
<script>
import { provide } from 'vue';
import { Icon } from '@iconify/vue'
import clickOutSide from '@mahdikhashan/vue3-click-outside'
export default {
name: 'Dropdown',
@@ -29,12 +30,15 @@ export default {
},
props: {
title: String
},
directives: {
clickOutSide,
}
}
</script>
<template>
<div id="button" @click="toggle" v-click-away="away">
<div id="button" @click="toggle" v-click-out-side="away">
<slot name="toggler">
<button>
<p>{{ title }}</p>

View File

@@ -11,10 +11,14 @@ export default {
</template>
<style scoped>
div {
background-color: aliceblue;
* {
color: var(--white);
padding: 5px;
}
h1 {
color: black !important;
div:hover {
background-color: var(--accent-primary);
transition: color 0.5s;
}
</style>