Skip to content

Commit a796e56

Browse files
fix(input-prefix): add container classname in props
1 parent 7433838 commit a796e56

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/components/input-prefix.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,15 @@ import { Input } from "./ui/input";
55
export interface InputWithPrefixProps
66
extends React.InputHTMLAttributes<HTMLInputElement> {
77
prefix: string;
8+
containerClassName?: string;
89
}
910

1011
const InputWithPrefix = React.forwardRef<
1112
HTMLInputElement,
1213
InputWithPrefixProps
13-
>(({ className, type, prefix, ...props }, ref) => {
14+
>(({ className, type, prefix, containerClassName, ...props }, ref) => {
1415
return (
15-
<div className="relative rounded-md overflow-hidden">
16+
<div className={cn("relative rounded-md overflow-hidden", containerClassName)}>
1617
<div className="text-accent-foreground/70 bg-accent/30 pointer-events-none absolute inset-y-0 left-0 flex items-center border-r border-input pr-2 pl-3">
1718
{prefix}
1819
</div>

0 commit comments

Comments
 (0)