File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
chartlets.js/packages/lib/src/plugins/mui Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import { type MouseEvent } from "react";
22import MuiButton from "@mui/material/Button" ;
33import MuiIcon from "@mui/material/Icon" ;
44
5- import type { ComponentState , ComponentProps } from "@/index" ;
5+ import type { ComponentProps , ComponentState } from "@/index" ;
66import { Tooltip } from "./Tooltip" ;
77
88interface 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
2525export 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 }
You can’t perform that action at this time.
0 commit comments