refactor(ui): change title to label prop for toggles for consistency

This commit is contained in:
ArneBo 2024-12-30 12:39:52 +01:00 committed by upsiflu
parent 1d2351892f
commit d0cea0fdf4
2 changed files with 4 additions and 4 deletions

View File

@ -3,7 +3,7 @@ import { color } from "~/composables/colors.ts";
const { big } = defineProps<{
big?: boolean
title?: string
label?: string
}>()
const isOn = defineModel<boolean>()
@ -19,7 +19,7 @@ const diameter = big? '28px' : '20px'
<input type="checkbox" v-model="isOn"
style="visibility: hidden; /* Hide even before stylesheet is loaded */"
/>
<span v-if="title">{{ title }}</span>
<span v-if="label">{{ label }}</span>
</label>
</template>

View File

@ -31,11 +31,11 @@ Link your toggle to an input using the `v-model` directive.
</Layout>
## Add title
## Add label
<Layout flex class="preview">
<Toggle v-model="toggle" title="Option 358" />
<Toggle v-model="toggle" label="Option 358" />
</Layout>