Did some work on encapsulating style sheets.

Coninued working on custom dropdowns. Still work to go but getting there.
This commit is contained in:
ajdj100
2023-05-18 22:09:55 -04:00
parent 6386e02acd
commit 54738d2ec9
8 changed files with 51 additions and 15 deletions

View File

@@ -31,6 +31,7 @@ export default {
flex-direction: column-reverse; flex-direction: column-reverse;
margin-top: 50px; margin-top: 50px;
max-width: 400px; max-width: 400px;
min-width: 260px;
padding-right: 120px; padding-right: 120px;
border-right: solid; border-right: solid;
border-color: var(--background-secondary); border-color: var(--background-secondary);

View File

@@ -6,6 +6,7 @@ import { RouterLink } from 'vue-router'
name: 'subnav', name: 'subnav',
props: { props: {
link: String, link: String,
content: String,
active: Boolean active: Boolean
} }
} }
@@ -13,6 +14,6 @@ import { RouterLink } from 'vue-router'
<template> <template>
<RouterLink :to="link"> <RouterLink :to="link">
<p>{{ content }}</p> <p :class="{active: active}">{{ content }}</p>
</RouterLink> </RouterLink>
</template> </template>

View File

@@ -9,7 +9,7 @@ export default {
sharedState: this.sharedState sharedState: this.sharedState
} }
}, },
data () { data() {
return { return {
sharedState: { sharedState: {
active: false active: false
@@ -20,22 +20,27 @@ export default {
toggle() { toggle() {
this.sharedState.active = !this.sharedState.active this.sharedState.active = !this.sharedState.active
} }
},
components: {
Icon
} }
} }
</script> </script>
<template> <template>
<div @click="toggle"> <div id="button" @click="toggle">
<slot name="toggler"> <slot name="toggler">
<button>toggle <a href="#">hello</a></button> <button>
<Icon icon="carbon:caret-down"/> toggle
<Icon icon="carbon:caret-down" />
</button>
</slot> </slot>
<slot/> <slot />
</div> </div>
</template> </template>
<style> <style scoped>
button { button {
background-color: var(--background-secondary); background-color: var(--background-secondary);
border: none; border: none;
@@ -44,5 +49,4 @@ button {
padding: 10px; padding: 10px;
color: var(--white); color: var(--white);
} }
</style> </style>

View File

@@ -17,3 +17,14 @@ export default {
<slot /> <slot />
</div> </div>
</template> </template>
<style scoped>
div {
display: flex;
flex-direction: column;
position: absolute;
background-color: var(--background-secondary);
border-radius: 0px 0px 10px 10px;
padding: 10px;
}
</style>

View File

@@ -1,5 +1,20 @@
<script>
export default {
name: 'dropdownItem'
}
</script>
<template> <template>
<div> <div>
test <slot></slot>
</div> </div>
</template> </template>
<style scoped>
div {
background-color: aliceblue;
}
h1 {
color: black !important;
}
</style>

View File

@@ -33,7 +33,7 @@ export default {
</div> </div>
</template> </template>
<style> <style scoped>
/* /*
COLOR PALLETE COLOR PALLETE
BLACK #1C1C21 BLACK #1C1C21

View File

@@ -41,7 +41,7 @@ export default {
</template> </template>
<style> <style scoped>
.button { .button {
color: var(--white); color: var(--white);
font-size: 30px; font-size: 30px;

View File

@@ -56,10 +56,14 @@ export default {
<dropdown> <dropdown>
<DropdownContent> <DropdownContent>
<DropDownItem>Test1</DropDownItem> <DropdownItem>Item 1</DropdownItem>
<DropdownItem>Item 2</DropdownItem>
<DropdownItem>Item 3</DropdownItem>
</DropdownContent> </DropdownContent>
</dropdown> </dropdown>
<Icon icon="carbon:caret-down" />
<!-- This button needs to get finished --> <!-- This button needs to get finished -->
<button @click="resetFilters()">Clear Filters</button> <button @click="resetFilters()">Clear Filters</button>
</div> </div>