export default { name: 'PlxCheckbox', props: { value: Boolean, indeterminate: Boolean, title: [String, Number], disabled: Boolean, name: String, size: String }, computed: { vSize () { return this.size || this.$parent.size || this.$parent.vSize } }, render (h) { let { disabled, title, vSize, indeterminate, value } = this let attrs = {} if (title) { attrs.title = title } return h('label', { class: ['plx-checkbox', { [`size--${vSize}`]: vSize, 'is--indeterminate': indeterminate, 'is--disabled': disabled }], attrs }, [ h('input', { attrs: { type: 'checkbox', disabled }, domProps: { checked: value }, on: { change: evnt => { if (!this.disabled) { let checked = evnt.target.checked this.$emit('input', checked) this.$emit('change', checked, evnt) } } } }), h('span', { class: 'plx-checkbox--icon' }), this.$slots.default ? h('span', { class: 'plx-checkbox--label' }, this.$slots.default) : null ]) } }