File tree 1 file changed +13
-9
lines changed
packages/react-ui-shadcn/src/components
1 file changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ type Props = {
17
17
onSelect : ( value : ModManifest ) => void ;
18
18
} ;
19
19
20
- export function ModsSearch ( props : Props ) {
20
+ export function ModsSearch ( props : Props & { children ?: React . ReactNode } ) {
21
21
const { mods, onSelect } = props ;
22
22
23
23
const [ open , setOpen ] = React . useState ( false ) ;
@@ -36,14 +36,18 @@ export function ModsSearch(props: Props) {
36
36
return (
37
37
< Popover open = { open } onOpenChange = { setOpen } >
38
38
< PopoverTrigger asChild >
39
- < Button
40
- variant = "outline"
41
- role = "combobox"
42
- aria-expanded = { open }
43
- type = "button"
44
- >
45
- +
46
- </ Button >
39
+ { props . children ? (
40
+ props . children
41
+ ) : (
42
+ < Button
43
+ variant = "outline"
44
+ role = "combobox"
45
+ aria-expanded = { open }
46
+ type = "button"
47
+ >
48
+ +
49
+ </ Button >
50
+ ) }
47
51
</ PopoverTrigger >
48
52
< PopoverContent className = "w-[400px] p-0" align = "start" >
49
53
< Command >
You can’t perform that action at this time.
0 commit comments