Add default slot, grow default by default

This commit is contained in:
rijkvanzanten
2020-08-25 13:58:48 -04:00
parent 091a34e732
commit 561d952d8a
2 changed files with 3 additions and 2 deletions

View File

@@ -107,7 +107,7 @@ export const htmlLabel = () => ({
},
template: `
<v-checkbox v-model="checked" @change="onChange">
<template #label>
<template>
Any <i>custom</i> markup in here
</template>
</v-checkbox>

View File

@@ -12,7 +12,7 @@
<div class="prepend" v-if="$scopedSlots.prepend"><slot name="prepend" /></div>
<v-icon class="checkbox" :name="icon" @click.stop="toggleInput" />
<span class="label type-text">
<slot name="label" v-if="customValue === false">{{ label }}</slot>
<slot v-if="customValue === false">{{ label }}</slot>
<input @click.stop class="custom-input" v-else v-model="_value" />
</span>
<div class="append" v-if="$scopedSlots.append"><slot name="append" /></div>
@@ -132,6 +132,7 @@ body {
appearance: none;
.label:not(:empty) {
flex-grow: 1;
margin-left: 8px;
transition: color var(--fast) var(--transition);