Added icon component. Stylized filter bar.

This commit is contained in:
2019-10-28 02:54:37 +01:00
parent df2e13f091
commit 5f853792b8
9 changed files with 321 additions and 111 deletions

View File

@@ -0,0 +1,61 @@
<template>
<div
:title="label"
:class="{ active }"
class="icon"
v-html="svg"
/>
</template>
<script>
export default {
props: {
icon: {
type: String,
default: null,
},
label: {
type: String,
default: null,
},
active: {
type: Boolean,
default: false,
},
},
data() {
return {
svg: null,
};
},
beforeMount() {
this.svg = require(`../../img/${this.icon}.svg`).default;
},
};
</script>
<style lang="scss">
@import '../../css/theme';
.icon {
fill: $text;
display: inline-block;
flex-shrink: 0;
width: 1rem;
height: 1rem;
svg {
width: 100%;
height: 100%;
}
&.active {
fill: $shadow;
&:hover {
fill: $text;
cursor: pointer;
}
}
}
</style>