|
1
|
import { Input, Text } from "@medusajs/ui"; |
|
2
|
import { ComponentProps, ElementRef, forwardRef } from "react"; |
|
3
|
|
|
4
|
export const HandleInput = forwardRef< |
|
5
|
ElementRef<typeof Input>, |
|
6
|
ComponentProps<typeof Input> |
|
7
|
>((props, ref) => { |
|
8
|
return ( |
|
9
|
<div className="relative"> |
|
10
|
<div className="absolute inset-y-0 left-0 z-10 flex w-8 items-center justify-center border-r"> |
|
11
|
<Text |
|
12
|
className="text-ui-fg-muted" |
|
13
|
size="small" |
|
14
|
leading="compact" |
|
15
|
weight="plus" |
|
16
|
> |
|
17
|
/ |
|
18
|
</Text> |
|
19
|
</div> |
|
20
|
<Input ref={ref} {...props} className="pl-10" /> |
|
21
|
</div> |
|
22
|
); |
|
23
|
}); |
|
24
|
|
|
25
|
HandleInput.displayName = "HandleInput"; |