mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-02-01 20:57:57 +01:00
playground: move pages under /components to match docs
This commit is contained in:
80
playground/app/pages/components/input.vue
Normal file
80
playground/app/pages/components/input.vue
Normal file
@@ -0,0 +1,80 @@
|
||||
<script setup lang="ts">
|
||||
import { upperFirst } from 'scule'
|
||||
import theme from '#build/ui/input'
|
||||
|
||||
const sizes = Object.keys(theme.variants.size) as Array<keyof typeof theme.variants.size>
|
||||
const variants = Object.keys(theme.variants.variant) as Array<keyof typeof theme.variants.variant>
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="flex flex-col items-center gap-4">
|
||||
<div class="flex flex-col gap-4 w-48">
|
||||
<UInput autofocus placeholder="Search..." />
|
||||
</div>
|
||||
<div class="flex items-center gap-2">
|
||||
<UInput v-for="variant in variants" :key="variant" :placeholder="upperFirst(variant)" :variant="variant" class="w-48" />
|
||||
</div>
|
||||
<div class="flex items-center gap-2">
|
||||
<UInput
|
||||
v-for="variant in variants"
|
||||
:key="variant"
|
||||
:placeholder="upperFirst(variant)"
|
||||
:variant="variant"
|
||||
color="gray"
|
||||
class="w-48"
|
||||
/>
|
||||
</div>
|
||||
<div class="flex items-center gap-2">
|
||||
<UInput
|
||||
v-for="variant in variants"
|
||||
:key="variant"
|
||||
:placeholder="upperFirst(variant)"
|
||||
:variant="variant"
|
||||
color="error"
|
||||
highlight
|
||||
class="w-48"
|
||||
/>
|
||||
</div>
|
||||
<div class="flex flex-col gap-4 w-48">
|
||||
<UInput placeholder="Disabled" disabled />
|
||||
<UInput placeholder="Required" required />
|
||||
<UInput file="i-heroicons-calculator" type="number" :model-value="10" />
|
||||
<UInput icon="i-heroicons-folder" type="file" />
|
||||
<UInput icon="i-heroicons-calendar" type="date" :model-value="new Date().toISOString().substring(0, 10)" />
|
||||
<UInput icon="i-heroicons-lock-closed" type="password" model-value="password" />
|
||||
<UInput loading placeholder="Search..." />
|
||||
<UInput loading trailing placeholder="Search..." />
|
||||
<UInput loading icon="i-heroicons-magnifying-glass" trailing-icon="i-heroicons-chevron-down" placeholder="Search..." />
|
||||
</div>
|
||||
<div class="flex items-center gap-4">
|
||||
<UInput
|
||||
v-for="size in sizes"
|
||||
:key="size"
|
||||
placeholder="Search..."
|
||||
:size="size"
|
||||
class="w-48"
|
||||
/>
|
||||
</div>
|
||||
<div class="flex items-center gap-4">
|
||||
<UInput
|
||||
v-for="size in sizes"
|
||||
:key="size"
|
||||
icon="i-heroicons-magnifying-glass"
|
||||
placeholder="Search..."
|
||||
:size="size"
|
||||
class="w-48"
|
||||
/>
|
||||
</div>
|
||||
<div class="flex items-center gap-4">
|
||||
<UInput
|
||||
v-for="size in sizes"
|
||||
:key="size"
|
||||
icon="i-heroicons-magnifying-glass"
|
||||
trailing
|
||||
placeholder="Search..."
|
||||
:size="size"
|
||||
class="w-48"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
Reference in New Issue
Block a user