[UI] Added disabled property to FloatingButton.

This commit is contained in:
Fabio Manganiello 2024-08-25 00:19:00 +02:00
parent 336cb18cb3
commit e8acf8615f
Signed by untrusted user: blacklight
GPG key ID: D90FBA7F76362774

View file

@ -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) {