Skip to content

Commit 0fed948

Browse files
committed
fix(react-ui-shadcn): add support for alternative popover button icon
1 parent fb6f00d commit 0fed948

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

packages/react-ui-shadcn/src/components/creation-mods-search.tsx

+13-9
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ type Props = {
1717
onSelect: (value: ModManifest) => void;
1818
};
1919

20-
export function ModsSearch(props: Props) {
20+
export function ModsSearch(props: Props & { children?: React.ReactNode }) {
2121
const { mods, onSelect } = props;
2222

2323
const [open, setOpen] = React.useState(false);
@@ -36,14 +36,18 @@ export function ModsSearch(props: Props) {
3636
return (
3737
<Popover open={open} onOpenChange={setOpen}>
3838
<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+
)}
4751
</PopoverTrigger>
4852
<PopoverContent className="w-[400px] p-0" align="start">
4953
<Command>

0 commit comments

Comments
 (0)