Skip to content

Commit

Permalink
fix: 🐛 "Analyze" button will now stay pressed when panel is open
Browse files Browse the repository at this point in the history
  • Loading branch information
EricLambrecht committed Jun 30, 2019
1 parent b6c457c commit c161a03
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
11 changes: 10 additions & 1 deletion src/components/_base/Button.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<button
v-bind="$attrs"
:class="{ button: true, primary, secondary, tertiary, disabled, small }"
:class="{ button: true, primary, secondary, tertiary, disabled, small, pressed }"
:disabled="disabled"
v-on="$listeners"
>
Expand Down Expand Up @@ -38,6 +38,10 @@ export default {
type: Boolean,
default: false,
},
pressed: {
type: Boolean,
default: false,
},
},
computed: {
hasIcon() {
Expand Down Expand Up @@ -99,6 +103,11 @@ export default {
&.disabled {
cursor: not-allowed;
}
&.pressed {
background-color: rgba(0,0,0,0.12);
box-shadow: inset 0 0 10px rgba(0,0,0,0.2);
}
}
.icon {
Expand Down
6 changes: 5 additions & 1 deletion src/components/editor/EditorOperationPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@
Shuffle
</b-button>
<sort-configuration />
<b-button tertiary @click="onClickStatistics">
<b-button
tertiary
:pressed="showStatistics"
@click="onClickStatistics"
>
<v-icon
slot="icon"
name="chart-line"
Expand Down

0 comments on commit c161a03

Please sign in to comment.