add dot-only prop to DotButton

This commit is contained in:
axolotle
2021-06-25 12:23:26 +02:00
parent 737e699815
commit 413673c2d5
2 changed files with 6 additions and 3 deletions
+5 -3
View File
@@ -1,7 +1,7 @@
<template>
<b-button
class="dot-btn"
:class="['dot-btn-' + variant, { 'active': active, 'show': show }]"
:class="['dot-btn-' + variant, { 'active': active, 'show': show, 'hide': dotOnly }]"
v-bind="$attrs" v-on="$listeners"
:active="active"
:variant="variant"
@@ -24,7 +24,8 @@ export default {
props: {
variant: { type: String, required: true },
active: { type: Boolean, default: false },
hovered: { type: Boolean, default: false }
hovered: { type: Boolean, default: false },
dotOnly: { type: Boolean, default: false }
},
data () {
@@ -52,7 +53,8 @@ export default {
word-break: keep-all;
white-space: pre;
&:not(.show) {
&:not(.show),
&.hide {
min-height: 1.1875rem;
min-width: 1.1875rem;
padding: 0;
@@ -9,6 +9,7 @@
@click="onOpen(child.id)"
:variant="child.variant"
:active="activeNodes.includes(child.id)"
dot-only
>
{{ $t('variants.' + child.variant) }}
</dot-button>