forked from themesberg/flowbite-react
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathforms.fileInput.tsx
More file actions
63 lines (56 loc) · 1.47 KB
/
forms.fileInput.tsx
File metadata and controls
63 lines (56 loc) · 1.47 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import { type CodeData } from '~/components/code-demo';
import { FileInput, Label } from '~/src';
const code = `
'use client';
import { FileInput, Label } from 'flowbite-react';
function Component() {
return (
<div id="fileUpload" className="max-w-md">
<div className="mb-2 block">
<Label htmlFor="file" value="Upload file" />
</div>
<FileInput id="file" helperText="A profile picture is useful to confirm your are logged into your account" />
</div>
);
}
`;
const codeRSC = `
import { FileInput, Label } from 'flowbite-react';
function Component() {
return (
<div id="fileUpload" className="max-w-md">
<div className="mb-2 block">
<Label htmlFor="file" value="Upload file" />
</div>
<FileInput id="file" helperText="A profile picture is useful to confirm your are logged into your account" />
</div>
);
}
`;
function Component() {
return (
<div id="fileUpload" className="max-w-md">
<div className="mb-2 block">
<Label htmlFor="file" value="Upload file" />
</div>
<FileInput id="file" helperText="A profile picture is useful to confirm your are logged into your account" />
</div>
);
}
export const fileInput: CodeData = {
type: 'single',
code: [
{
fileName: 'client',
language: 'tsx',
code,
},
{
fileName: 'server',
language: 'tsx',
code: codeRSC,
},
],
githubSlug: 'forms/forms.fileInput.tsx',
component: <Component />,
};