Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

Add disabled to BBCheckbox

天舟640478d8db42
diff --git a/frontend/src/bbkit/BBCheckbox.vue b/frontend/src/bbkit/BBCheckbox.vue
index 8609286477..1942792bf6 100644
--- a/frontend/src/bbkit/BBCheckbox.vue
+++ b/frontend/src/bbkit/BBCheckbox.vue
@@ -3,7 +3,8 @@
<div class="flex items-center h-5">
<input
type="checkbox"
- class="focus:ring-accent h-4 w-4 text-accent border-control-border rounded"
+ class="h-4 w-4 text-accent rounded disabled:cursor-not-allowed border-control-border focus:ring-accent"
+ :disabled="disabled"
:checked="value"
@input="
() => {
@@ -14,7 +15,11 @@
/>
</div>
<div v-if="label" class="ml-2 text-sm">
- <label class="font-medium text-main">{{ label }}</label>
+ <label
+ class="font-medium"
+ :class="disabled ? 'text-gray-400' : 'text-main'"
+ >{{ label }}</label
+ >
</div>
</div>
</template>
@@ -34,6 +39,10 @@ export default {
default: true,
type: Boolean,
},
+ disabled: {
+ default: false,
+ type: Boolean,
+ },
},
setup(props, ctx) {
const on = ref(props.value);