component Checkbox { props { @event input = function @event change = function @event focus = function @event blur = function @event invalid = function size = "default" color = "primary" id = "" name = "" label = "Checkbox" hiddenLabel = false placeholder = "" variant = "normal" icon = "" iconPosition = "start" value = "on" values = [] options = [] checked = false indeterminate = false orientation = "vertical" card = false rightAligned = false list = false helperText = "" cornerHint = "" error = "" inline = false readonly = false disabled = false required = false class = "" } functions { function emitField(nameEvent, sourceEvent) { sourceEvent.stopPropagation(); $emit(nameEvent, { checked: sourceEvent.currentTarget.checked, value: sourceEvent.currentTarget.value, values: values, name: name, sourceEvent: sourceEvent }) } function preventReadonly(sourceEvent) { if (readonly) sourceEvent.preventDefault() } } view {
{#if options.length || cornerHint}{label}{#if cornerHint}{cornerHint}{/if}{/if}
{#if options.length}
{#each options as option} {/each}
{:else} {/if} {#if helperText}{helperText}{/if}{error}
} }