Disabled and checked token for checkbox

pull/6011/head
Cagatay Civici 2024-07-03 11:44:06 +03:00
parent ee171b5c86
commit 2966a83ffd
5 changed files with 17 additions and 8 deletions

View File

@ -2,8 +2,9 @@
<DocSectionText v-bind="$attrs">
<p>When <i>disabled</i> is present, the element cannot be edited and focused.</p>
</DocSectionText>
<div class="card flex justify-center">
<Checkbox v-model="checked" disabled />
<div class="card flex justify-center gap-2">
<Checkbox v-model="checked1" binary disabled />
<Checkbox v-model="checked2" binary disabled />
</div>
<DocSectionCode :code="code" />
</template>
@ -12,15 +13,18 @@
export default {
data() {
return {
checked: false,
checked1: false,
checked2: true,
code: {
basic: `
<Checkbox v-model="checked" disabled />
<Checkbox v-model="checked1" binary disabled />
<Checkbox v-model="checked2" binary disabled />
`,
options: `
<template>
<div class="card flex justify-center">
<Checkbox v-model="checked" disabled />
<div class="card flex justify-center gap-2">
<Checkbox v-model="checked1" binary disabled />
<Checkbox v-model="checked2" binary disabled />
</div>
</template>
@ -36,8 +40,9 @@ export default {
`,
composition: `
<template>
<div class="card flex justify-center">
<Checkbox v-model="checked" disabled />
<div class="card flex justify-center gap-2">
<Checkbox v-model="checked1" binary disabled />
<Checkbox v-model="checked2" binary disabled />
</div>
</template>

View File

@ -106,6 +106,7 @@ const theme = ({ dt }) => `
.p-checkbox.p-disabled .p-checkbox-box {
background: ${dt('checkbox.disabled.background')};
border-color: ${dt('checkbox.checked.disabled.border.color')};
}
.p-checkbox.p-disabled .p-checkbox-box .p-checkbox-icon {

View File

@ -14,6 +14,7 @@ export default {
checkedBorderColor: '{primary.color}',
checkedHoverBorderColor: '{primary.hover.color}',
checkedFocusBorderColor: '{primary.color}',
checkedDisabledBorderColor: '{form.field.border.color}',
invalidBorderColor: '{form.field.invalid.border.color}',
shadow: '{form.field.shadow}',
focusRing: {

View File

@ -14,6 +14,7 @@ export default {
checkedBorderColor: '{primary.color}',
checkedHoverBorderColor: '{primary.hover.color}',
checkedFocusBorderColor: '{primary.color}',
checkedDisabledBorderColor: '{form.field.border.color}',
invalidBorderColor: '{form.field.invalid.border.color}',
shadow: '{form.field.shadow}',
focusRing: {

View File

@ -14,6 +14,7 @@ export default {
checkedBorderColor: '{primary.color}',
checkedHoverBorderColor: '{primary.hover.color}',
checkedFocusBorderColor: '{primary.color}',
checkedDisabledBorderColor: '{form.field.border.color}',
invalidBorderColor: '{form.field.invalid.border.color}',
shadow: '{form.field.shadow}',
focusRing: {