FMHYedit/.vitepress/theme/components/InputField.vue

48 lines
769 B
Vue
Raw Permalink Normal View History

2023-11-12 16:42:57 +00:00
<script setup lang="ts">
defineProps<{
2024-01-25 16:32:45 +00:00
label: string
id: string
}>()
2023-11-12 16:42:57 +00:00
</script>
<template>
<div class="input-field">
2023-11-14 17:18:52 +00:00
<div v-if="label" class="input-label">
2023-11-12 16:42:57 +00:00
<label :for="id" class="pane-label">
{{ label }}
</label>
<div class="display-value">
<slot name="display" />
</div>
</div>
<slot />
</div>
</template>
<style scoped>
.pane-label {
line-height: 20px;
font-size: 13px;
font-weight: 600;
color: var(--vt-c-text-1);
display: block;
}
.input-field:not(:last-child) {
margin-bottom: 16px;
}
.display-value {
font-size: 13px;
color: var(--vp-c-text-2);
}
.input-label {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 8px;
gap: 12px;
}
</style>