saq1b commited on
Commit
c92b456
1 Parent(s): 35e41b4

Upload 3 files

Browse files
components/ui/card.tsx ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import * as React from "react"
2
+
3
+ import { Button } from "@/components/ui/button"
4
+ import {
5
+ Card,
6
+ CardContent,
7
+ CardDescription,
8
+ CardFooter,
9
+ CardHeader,
10
+ CardTitle,
11
+ } from "@/components/ui/card"
12
+ import { Input } from "@/components/ui/input"
13
+ import { Label } from "@/components/ui/label"
14
+ import {
15
+ Select,
16
+ SelectContent,
17
+ SelectItem,
18
+ SelectTrigger,
19
+ SelectValue,
20
+ } from "@/components/ui/select"
21
+
22
+ export function CardWithForm() {
23
+ return (
24
+ <Card className="w-[350px]">
25
+ <CardHeader>
26
+ <CardTitle>Create project</CardTitle>
27
+ <CardDescription>Deploy your new project in one-click.</CardDescription>
28
+ </CardHeader>
29
+ <CardContent>
30
+ <form>
31
+ <div className="grid w-full items-center gap-4">
32
+ <div className="flex flex-col space-y-1.5">
33
+ <Label htmlFor="name">Name</Label>
34
+ <Input id="name" placeholder="Name of your project" />
35
+ </div>
36
+ <div className="flex flex-col space-y-1.5">
37
+ <Label htmlFor="framework">Framework</Label>
38
+ <Select>
39
+ <SelectTrigger id="framework">
40
+ <SelectValue placeholder="Select" />
41
+ </SelectTrigger>
42
+ <SelectContent position="popper">
43
+ <SelectItem value="next">Next.js</SelectItem>
44
+ <SelectItem value="sveltekit">SvelteKit</SelectItem>
45
+ <SelectItem value="astro">Astro</SelectItem>
46
+ <SelectItem value="nuxt">Nuxt.js</SelectItem>
47
+ </SelectContent>
48
+ </Select>
49
+ </div>
50
+ </div>
51
+ </form>
52
+ </CardContent>
53
+ <CardFooter className="flex justify-between">
54
+ <Button variant="outline">Cancel</Button>
55
+ <Button>Deploy</Button>
56
+ </CardFooter>
57
+ </Card>
58
+ )
59
+ }
components/ui/input.tsx ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import * as React from "react"
2
+
3
+ import { cn } from "@/lib/utils"
4
+
5
+ export interface InputProps
6
+ extends React.InputHTMLAttributes<HTMLInputElement> {}
7
+
8
+ const Input = React.forwardRef<HTMLInputElement, InputProps>(
9
+ ({ className, type, ...props }, ref) => {
10
+ return (
11
+ <input
12
+ type={type}
13
+ className={cn(
14
+ "flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
15
+ className
16
+ )}
17
+ ref={ref}
18
+ {...props}
19
+ />
20
+ )
21
+ }
22
+ )
23
+ Input.displayName = "Input"
24
+
25
+ export { Input }
components/ui/textarea.tsx ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import * as React from "react"
2
+
3
+ import { cn } from "@/lib/utils"
4
+
5
+ export interface TextareaProps
6
+ extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {}
7
+
8
+ const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(
9
+ ({ className, ...props }, ref) => {
10
+ return (
11
+ <textarea
12
+ className={cn(
13
+ "flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
14
+ className
15
+ )}
16
+ ref={ref}
17
+ {...props}
18
+ />
19
+ )
20
+ }
21
+ )
22
+ Textarea.displayName = "Textarea"
23
+
24
+ export { Textarea }