mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-19 02:48:12 +08:00
Populate tool shelf and tool options bar (#66)
This commit is contained in:
45
client/web/src/components/widgets/DropdownButton.vue
Normal file
45
client/web/src/components/widgets/DropdownButton.vue
Normal file
@@ -0,0 +1,45 @@
|
||||
<template>
|
||||
<button class="dropdown-button">
|
||||
<component :is="icon" />
|
||||
</button>
|
||||
</template>
|
||||
|
||||
<style lang="scss">
|
||||
.dropdown-button {
|
||||
width: 16px;
|
||||
height: 24px;
|
||||
margin: 2px 4px;
|
||||
padding: 0;
|
||||
outline: none;
|
||||
border: none;
|
||||
border-radius: 2px;
|
||||
background: #111;
|
||||
fill: #ddd;
|
||||
|
||||
&:hover {
|
||||
background: #555;
|
||||
fill: #fff;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from "vue";
|
||||
import DropdownArrow from "../../../assets/svg/16x24-bounds-8x16-icon/dropdown-arrow.svg";
|
||||
import VerticalEllipsis from "../../../assets/svg/16x24-bounds-8x16-icon/vertical-ellipsis.svg";
|
||||
|
||||
export enum DropdownButtonIcon {
|
||||
"DropdownArrow" = "DropdownArrow",
|
||||
"VerticalEllipsis" = "VerticalEllipsis",
|
||||
}
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
VerticalEllipsis,
|
||||
DropdownArrow,
|
||||
},
|
||||
props: {
|
||||
icon: { type: String, default: DropdownButtonIcon.DropdownArrow },
|
||||
},
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user