File tree Expand file tree Collapse file tree 3 files changed +28
-35
lines changed
Expand file tree Collapse file tree 3 files changed +28
-35
lines changed Original file line number Diff line number Diff line change 1- import type { MapElement } from "@/types/utils"
2- import { forwardRef } from "react"
1+ import { ReactForwardRef } from "@mav/shared/types"
32import { LuSearch as SearchIcon } from "react-icons/lu"
43
5- const SearchBox = forwardRef (
6- (
7- {
8- placeholder
9- } : {
10- placeholder ?: string
11- } ,
12- ref : React . ForwardedRef < MapElement < "input" > >
13- ) => {
14- return (
15- < div className = "relative w-full" >
16- < div className = "pointer-events-none absolute left-3.5 flex h-full items-center justify-center" >
17- < SearchIcon size = { 18 } />
18- </ div >
19- < input
20- ref = { ref }
21- type = "search"
22- name = "Search"
23- className = "bg-200 font-inter h-full w-full rounded-md border-none py-2 pl-10 pr-1 text-sm"
24- placeholder = { placeholder }
25- />
26- </ div >
27- )
28- }
29- )
4+ interface SearchBoxProps {
5+ placeholder ?: string
6+ }
307
31- SearchBox . displayName = "SearchBox"
8+ export function SearchBox ( {
9+ ref,
10+ ...props
11+ } : ReactForwardRef < HTMLInputElement , SearchBoxProps > ) {
12+ const { placeholder } = props
3213
33- export default SearchBox
14+ return (
15+ < div className = "relative w-full" >
16+ < div className = "pointer-events-none absolute left-3.5 flex h-full items-center justify-center" >
17+ < SearchIcon size = { 18 } />
18+ </ div >
19+ < input
20+ ref = { ref }
21+ type = "search"
22+ name = "Search"
23+ className = "bg-200 font-inter h-full w-full rounded-md border-none py-2 pl-10 pr-1 text-sm"
24+ placeholder = { placeholder }
25+ />
26+ </ div >
27+ )
28+ }
Original file line number Diff line number Diff line change 1- import RichTextField from "./RichTextField"
2- import SearchBox from "./SearchBox"
3- import SelectField from "./SelectField"
4-
5- export { RichTextField , SearchBox , SelectField }
1+ export * from "./RichTextField"
2+ export * from "./SearchBox"
3+ export * from "./SelectField"
4+ export * from "./Checkbox"
Original file line number Diff line number Diff line change 1- import type React from "react"
21import { Artwork , Character } from "./characters"
32import { UserType } from "./users"
43
You can’t perform that action at this time.
0 commit comments