Implement Input Components

This commit is contained in:
Samuel Lorch 2023-03-28 23:46:55 +02:00
parent 06be2da875
commit c683dd5981
5 changed files with 57 additions and 1 deletions

View file

@ -0,0 +1,21 @@
<script setup lang="ts">
const props = defineModel<{
modelValue: boolean,
}>();
let { modelValue } = $(props);
</script>
<template>
<div @click="() => modelValue = !modelValue">
<i-material-symbols-check-box-outline v-if="modelValue"/>
<i-material-symbols-check-box-outline-blank v-else/>
</div>
</template>
<style scoped>
div {
cursor: pointer;
}
</style>

View file

@ -0,0 +1,18 @@
<script setup lang="ts">
const props = defineModel<{
modelValue: string,
}>();
let { modelValue } = $(props);
</script>
<template>
<textarea v-model="modelValue" rows="5"/>
</template>
<style scoped>
textarea {
resize: vertical;
}
</style>

View file

@ -0,0 +1,15 @@
<script setup lang="ts">
const props = defineModel<{
modelValue: string,
}>();
let { modelValue } = $(props);
</script>
<template>
<input v-model="modelValue">
</template>
<style scoped>
</style>

View file

@ -3,4 +3,5 @@
.pad { padding: 0.5rem; }
.gap { gap: 0.5rem; }
.flex-grow { flex-grow: 1; }
.flex-row { flex-direction: row; }
.flex-row { flex-direction: row; }
.scroll { overflow-y:auto; }

View file

@ -12,6 +12,7 @@
user-select: inherit;
color: inherit;
overflow: hidden;
flex-shrink: 0;
}
div, ul, ol, nav {