mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
feat: Fix checkbox line height and make checkbox label clickable (#4818)
* fix: Update checkbox design and make checkbox label clickable * fix: Remove checkbox ids * chore: remove unused imports
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<el-checkbox
|
||||
v-bind="$props"
|
||||
ref="checkbox"
|
||||
:class="['n8n-checkbox', $style.n8nCheckbox]"
|
||||
:disabled="disabled"
|
||||
:indeterminate="indeterminate"
|
||||
@@ -12,7 +13,8 @@
|
||||
:tooltipText="tooltipText"
|
||||
:bold="false"
|
||||
:size="labelSize"
|
||||
></n8n-input-label>
|
||||
@click.prevent="onLabelClick"
|
||||
/>
|
||||
</el-checkbox>
|
||||
</template>
|
||||
|
||||
@@ -58,6 +60,14 @@ export default Vue.extend({
|
||||
onChange(event: Event) {
|
||||
this.$emit('input', event);
|
||||
},
|
||||
onLabelClick() {
|
||||
const checkboxComponent = this.$refs.checkbox as ElCheckbox;
|
||||
if (!checkboxComponent) {
|
||||
return;
|
||||
}
|
||||
|
||||
(checkboxComponent.$el as HTMLElement).click();
|
||||
},
|
||||
},
|
||||
});
|
||||
</script>
|
||||
@@ -70,5 +80,9 @@ export default Vue.extend({
|
||||
span {
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
label {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div :class="$style.container">
|
||||
<div :class="$style.container" v-on="$listeners">
|
||||
<label
|
||||
v-if="label || $slots.options"
|
||||
:for="inputName"
|
||||
@@ -12,7 +12,7 @@
|
||||
}"
|
||||
>
|
||||
<div :class="$style.title" v-if="label">
|
||||
<n8n-text :bold="bold" :size="size" :compact="!underline && !$slots.options" :color="color">
|
||||
<n8n-text :bold="bold" :size="size" :compact="compact" :color="color">
|
||||
{{ label }}
|
||||
<n8n-text color="primary" :bold="bold" :size="size" v-if="required">*</n8n-text>
|
||||
</n8n-text>
|
||||
@@ -57,6 +57,10 @@ export default Vue.extend({
|
||||
N8nTooltip,
|
||||
},
|
||||
props: {
|
||||
compact: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
color: {
|
||||
type: String,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user