forked from platypush/platypush
[UI] Added disabled
property to FloatingButton
.
This commit is contained in:
parent
336cb18cb3
commit
e8acf8615f
1 changed files with 16 additions and 1 deletions
|
@ -1,6 +1,10 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="floating-btn" :class="className">
|
<div class="floating-btn" :class="className">
|
||||||
<button type="button" class="btn btn-primary" :title="title" @click="$emit('click', $event)">
|
<button type="button"
|
||||||
|
class="btn btn-primary"
|
||||||
|
:disabled="disabled"
|
||||||
|
:title="title"
|
||||||
|
@click="$emit('click', $event)">
|
||||||
<Icon :class="iconClass" :url="iconUrl" />
|
<Icon :class="iconClass" :url="iconUrl" />
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -15,6 +19,10 @@ export default {
|
||||||
emits: ["click"],
|
emits: ["click"],
|
||||||
|
|
||||||
props: {
|
props: {
|
||||||
|
disabled: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
iconClass: {
|
iconClass: {
|
||||||
type: String,
|
type: String,
|
||||||
},
|
},
|
||||||
|
@ -57,6 +65,13 @@ export default {
|
||||||
&:hover {
|
&:hover {
|
||||||
background: $tile-hover-bg !important;
|
background: $tile-hover-bg !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&:disabled,
|
||||||
|
&[disabled] {
|
||||||
|
background: $default-bg-7 !important;
|
||||||
|
color: $disabled-fg !important;
|
||||||
|
cursor: not-allowed;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(button) {
|
:deep(button) {
|
||||||
|
|
Loading…
Reference in a new issue