Skip to content

Commit b150027

Browse files
committed
styled button ref updated
1 parent 57617fb commit b150027

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@amnstak/react-image-annotate",
3-
"version": "0.0.11",
3+
"version": "0.0.16",
44
"type": "module",
55
"main": "dist/lib.js",
66
"types": "dist/lib.d.ts",

src/workspace/HeaderButton/index.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,19 @@ const getIcon = (
2222
return <Icon />;
2323
};
2424

25-
const StyledButton = styled(Button)(() => ({
25+
const StyledButton = styled(
26+
forwardRef<HTMLButtonElement, React.ComponentProps<typeof Button>>((props, ref) => (
27+
<Button ref={ref} {...props} />
28+
))
29+
)(() => ({
2630
textTransform: "none",
2731
width: 60,
2832
paddingTop: 8,
2933
paddingBottom: 4,
3034
marginLeft: 1,
3135
marginRight: 1,
3236
}));
37+
3338
const ButtonInnerContent = styled("div")(() => ({
3439
display: "flex",
3540
flexDirection: "column",

0 commit comments

Comments
 (0)