Skip to content

Commit

Permalink
chore(#117): add disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
Decipher committed Oct 16, 2023
1 parent 7d6cf75 commit 210b892
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/components/Checkbox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,26 @@
class="ct-checkbox"
:class="{
[themeClass]: true,
'ct-checkbox--disabled': disabled,
'ct-checkbox--error': error
}"
>
<input
v-model="model"
type="checkbox"
:disable="disabled"
class="ct-checkbox__element"
:required="required"
type="checkbox"
>
<span class="ct-checkbox__state" />
<label class="ct-checkbox__label"><slot>{{ label }}</slot></label>
<label
:class="{
'ct-checkbox__label': true,
'ct-checkbox__label--disabled': disabled,
}"
>
<slot>{{ label }}</slot>
</label>
</div>
</template>

Expand All @@ -24,6 +33,10 @@ export default {
mixins: [ThemeMixin],
props: {
disabled: {
type: Boolean,
default: false
},
error: {
type: Boolean,
default: false
Expand Down

0 comments on commit 210b892

Please sign in to comment.