mirror of
https://github.com/speatzle/nfsense.git
synced 2025-05-11 02:48:21 +00:00
Implement Input Components
This commit is contained in:
parent
06be2da875
commit
c683dd5981
5 changed files with 57 additions and 1 deletions
21
client/src/components/inputs/CheckBox.vue
Normal file
21
client/src/components/inputs/CheckBox.vue
Normal 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>
|
18
client/src/components/inputs/MultilineTextBox.vue
Normal file
18
client/src/components/inputs/MultilineTextBox.vue
Normal 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>
|
15
client/src/components/inputs/TextBox.vue
Normal file
15
client/src/components/inputs/TextBox.vue
Normal 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>
|
|
@ -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; }
|
|
@ -12,6 +12,7 @@
|
|||
user-select: inherit;
|
||||
color: inherit;
|
||||
overflow: hidden;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
div, ul, ol, nav {
|
||||
|
|
Loading…
Add table
Reference in a new issue