diff options
author | 2023-05-07 23:31:10 +0200 | |
---|---|---|
committer | 2023-05-14 22:30:23 +0200 | |
commit | aad8d84e13ce31c1b7c1cbb930fb8bd4c0abe13a (patch) | |
tree | c483e3a25c858c09c73496616d95f168d8b9298d /src/ui/c-input-text/c-input-text.demo.vue | |
parent | 401f13f7e305d60097db2334642e423c41d8897d (diff) | |
download | it-tools-aad8d84e13ce31c1b7c1cbb930fb8bd4c0abe13a.tar.gz it-tools-aad8d84e13ce31c1b7c1cbb930fb8bd4c0abe13a.tar.zst it-tools-aad8d84e13ce31c1b7c1cbb930fb8bd4c0abe13a.zip |
ui-lib(new-component): added text input component in the c-lib
Diffstat (limited to 'src/ui/c-input-text/c-input-text.demo.vue')
-rw-r--r-- | src/ui/c-input-text/c-input-text.demo.vue | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/ui/c-input-text/c-input-text.demo.vue b/src/ui/c-input-text/c-input-text.demo.vue new file mode 100644 index 0000000..2363219 --- /dev/null +++ b/src/ui/c-input-text/c-input-text.demo.vue @@ -0,0 +1,39 @@ +<template> + <h2>Default</h2> + + <c-input-text value="qsd" /> + + <h2>With placeholder</h2> + + <c-input-text placeholder="Placeholder" /> + + <h2>With label</h2> + + <c-input-text label="Label" mb-2 /> + <c-input-text label="Label" mb-2 label-position="left" /> + <c-input-text label="Label" mb-2 label-position="left" label-width="100px" /> + <c-input-text label="Label" mb-2 label-position="left" label-width="100px" label-align="right" /> + + <h2>Readonly</h2> + + <c-input-text value="value" readonly /> + + <h2>Disabled</h2> + + <c-input-text value="value" disabled /> + + <h2>Validation</h2> + + <c-input-text + v-model:value="value" + :validation-rules="[{ message: 'Length must be > 10', validator: (value) => value.length > 10 }]" + /> + + <h2>Clearable</h2> + + <c-input-text v-model:value="value" clearable /> +</template> + +<script lang="ts" setup> +const value = ref('value'); +</script> |