docs: add Input with icon example (#346)
This commit is contained in:
parent
406e4ff8a8
commit
9c015067e3
|
|
@ -443,6 +443,13 @@ export const Index = {
|
||||||
component: () => import('../src/lib/registry/default/example/InputWithButton.vue').then(m => m.default),
|
component: () => import('../src/lib/registry/default/example/InputWithButton.vue').then(m => m.default),
|
||||||
files: ['../src/lib/registry/default/example/InputWithButton.vue'],
|
files: ['../src/lib/registry/default/example/InputWithButton.vue'],
|
||||||
},
|
},
|
||||||
|
InputWithIcon: {
|
||||||
|
name: 'InputWithIcon',
|
||||||
|
type: 'components:example',
|
||||||
|
registryDependencies: ['input'],
|
||||||
|
component: () => import('../src/lib/registry/default/example/InputWithIcon.vue').then(m => m.default),
|
||||||
|
files: ['../src/lib/registry/default/example/InputWithIcon.vue'],
|
||||||
|
},
|
||||||
InputWithLabel: {
|
InputWithLabel: {
|
||||||
name: 'InputWithLabel',
|
name: 'InputWithLabel',
|
||||||
type: 'components:example',
|
type: 'components:example',
|
||||||
|
|
@ -1362,6 +1369,13 @@ export const Index = {
|
||||||
component: () => import('../src/lib/registry/new-york/example/InputWithButton.vue').then(m => m.default),
|
component: () => import('../src/lib/registry/new-york/example/InputWithButton.vue').then(m => m.default),
|
||||||
files: ['../src/lib/registry/new-york/example/InputWithButton.vue'],
|
files: ['../src/lib/registry/new-york/example/InputWithButton.vue'],
|
||||||
},
|
},
|
||||||
|
InputWithIcon: {
|
||||||
|
name: 'InputWithIcon',
|
||||||
|
type: 'components:example',
|
||||||
|
registryDependencies: ['input'],
|
||||||
|
component: () => import('../src/lib/registry/new-york/example/InputWithIcon.vue').then(m => m.default),
|
||||||
|
files: ['../src/lib/registry/new-york/example/InputWithIcon.vue'],
|
||||||
|
},
|
||||||
InputWithLabel: {
|
InputWithLabel: {
|
||||||
name: 'InputWithLabel',
|
name: 'InputWithLabel',
|
||||||
type: 'components:example',
|
type: 'components:example',
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,10 @@ import { Input } from '@/components/ui/input'
|
||||||
|
|
||||||
<ComponentPreview name="InputWithButton" class="max-w-xs" />
|
<ComponentPreview name="InputWithButton" class="max-w-xs" />
|
||||||
|
|
||||||
|
### With Icon
|
||||||
|
|
||||||
|
<ComponentPreview name="InputWithIcon" class="max-w-xs" />
|
||||||
|
|
||||||
### Form
|
### Form
|
||||||
|
|
||||||
<ComponentPreview name="InputForm" />
|
<ComponentPreview name="InputForm" />
|
||||||
|
|
|
||||||
13
apps/www/src/lib/registry/default/example/InputWithIcon.vue
Normal file
13
apps/www/src/lib/registry/default/example/InputWithIcon.vue
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { MagnifyingGlassIcon } from '@radix-icons/vue'
|
||||||
|
import { Input } from '@/lib/registry/default/ui/input'
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="relative w-full max-w-sm items-center">
|
||||||
|
<Input id="search" type="text" placeholder="Search..." class="pl-10" />
|
||||||
|
<span class="absolute start-0 inset-y-0 flex items-center justify-center px-2">
|
||||||
|
<MagnifyingGlassIcon class="size-6 text-muted-foreground" />
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
13
apps/www/src/lib/registry/new-york/example/InputWithIcon.vue
Normal file
13
apps/www/src/lib/registry/new-york/example/InputWithIcon.vue
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { MagnifyingGlassIcon } from '@radix-icons/vue'
|
||||||
|
import { Input } from '@/lib/registry/new-york/ui/input'
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="relative w-full max-w-sm items-center">
|
||||||
|
<Input id="search" type="text" placeholder="Search..." class="pl-10" />
|
||||||
|
<span class="absolute start-0 inset-y-0 flex items-center justify-center px-2">
|
||||||
|
<MagnifyingGlassIcon class="size-6 text-muted-foreground" />
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
Loading…
Reference in New Issue
Block a user