-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathToolInput.jsx
More file actions
35 lines (33 loc) · 804 Bytes
/
Copy pathToolInput.jsx
File metadata and controls
35 lines (33 loc) · 804 Bytes
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
import React from 'react';
import { Input } from '../ui/input';
import { Label } from '../ui/label';
import { cn } from '../../utils/cn';
export function ToolInput({
label,
value,
onChange,
placeholder,
type = 'text',
className,
containerClassName,
...props
}) {
return (
<div className={cn('grid w-full items-center gap-1.5', containerClassName)}>
{label && (
<Label className="text-[11px] font-bold uppercase tracking-wider text-muted-foreground/70 ml-1">
{label}
</Label>
)}
<Input
type={type}
value={value}
onChange={onChange}
placeholder={placeholder}
className={cn('h-9 bg-background/50 border-border/40', className)}
{...props}
/>
</div>
);
}
export default ToolInput;