Skip to content

Commit 476b3eb

Browse files
authored
fix warning in console about unsupported isselected prop (#253)
1 parent fe96823 commit 476b3eb

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

packages/react/src/SharedComponents/Toolbar/components/ToolbarDropdownTarget.tsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
import { Button } from "@mantine/core";
2-
import { HiChevronDown } from "react-icons/hi";
2+
import { MouseEventHandler, forwardRef } from "react";
33
import { IconType } from "react-icons";
4-
import { forwardRef } from "react";
4+
import { HiChevronDown } from "react-icons/hi";
55

66
export type ToolbarDropdownTargetProps = {
77
text: string;
88
icon?: IconType;
99
isDisabled?: boolean;
10+
onClick?: MouseEventHandler;
1011
};
1112

1213
export const ToolbarDropdownTarget = forwardRef<
1314
HTMLButtonElement,
1415
ToolbarDropdownTargetProps
1516
>((props: ToolbarDropdownTargetProps, ref) => {
16-
const { text, icon, isDisabled, ...others } = props;
17-
1817
const TargetIcon = props.icon;
1918
return (
2019
<Button
@@ -23,8 +22,8 @@ export const ToolbarDropdownTarget = forwardRef<
2322
size={"xs"}
2423
variant={"subtle"}
2524
disabled={props.isDisabled}
26-
ref={ref}
27-
{...others}>
25+
onClick={props.onClick}
26+
ref={ref}>
2827
{props.text}
2928
</Button>
3029
);

0 commit comments

Comments
 (0)