Skip to content

Commit 28b21e6

Browse files
committed
Update button.tsx (missing tooltip)
1 parent 01447a1 commit 28b21e6

File tree

1 file changed

+4
-3
lines changed
  • chartlets.js/packages/lib/src/plugins/mui

1 file changed

+4
-3
lines changed

chartlets.js/packages/lib/src/plugins/mui/Button.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { type MouseEvent } from "react";
22
import MuiButton from "@mui/material/Button";
33
import MuiIcon from "@mui/material/Icon";
44

5-
import type { ComponentState, ComponentProps } from "@/index";
5+
import type { ComponentProps, ComponentState } from "@/index";
66
import { Tooltip } from "./Tooltip";
77

88
interface ButtonState extends ComponentState {
@@ -20,7 +20,7 @@ interface ButtonState extends ComponentState {
2020
| "warning";
2121
}
2222

23-
interface ButtonProps extends ComponentProps, ButtonState {}
23+
export interface ButtonProps extends ComponentProps, ButtonState {}
2424

2525
export function Button({
2626
type,
@@ -33,6 +33,7 @@ export function Button({
3333
text,
3434
startIcon,
3535
endIcon,
36+
tooltip,
3637
onChange,
3738
}: ButtonProps) {
3839
const handleClick = (_event: MouseEvent<HTMLButtonElement>) => {
@@ -46,7 +47,7 @@ export function Button({
4647
}
4748
};
4849
return (
49-
<Tooltip>
50+
<Tooltip title={tooltip}>
5051
<MuiButton
5152
id={id}
5253
name={name}

0 commit comments

Comments
 (0)