-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathinput-field-examples.tsx
More file actions
34 lines (32 loc) · 1.17 KB
/
input-field-examples.tsx
File metadata and controls
34 lines (32 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
'use client';
import { Field, Flex, InputField } from '@raystack/apsara';
import { Home, Info } from 'lucide-react';
import PlaygroundLayout from './playground-layout';
export function InputFieldExamples() {
return (
<PlaygroundLayout title='InputField'>
<Flex gap='large' wrap='wrap'>
<Flex gap='large' direction='column' style={{ width: 300 }}>
<Field label='Default'>
<InputField placeholder='Enter text' />
</Field>
<Field label='With Helper Text' helperText='This is a helper text'>
<InputField placeholder='Enter text' />
</Field>
<Field label='With Error' error='This field is required'>
<InputField placeholder='Enter text' />
</Field>
</Flex>
<Flex gap='large' direction='column' style={{ width: 300 }}>
<InputField placeholder='0.00' prefix='$' suffix='USD' />
<InputField
placeholder='Enter text'
leadingIcon={<Home size={16} />}
trailingIcon={<Info size={16} />}
/>
<InputField placeholder='Enter text' disabled />
</Flex>
</Flex>
</PlaygroundLayout>
);
}