Add tooltips to export buttons

This commit is contained in:
Pierre HUBERT 2023-08-26 08:07:32 +02:00
parent df7600f959
commit d3b1028fe4

View File

@ -1,7 +1,7 @@
import { mdiXml } from "@mdi/js"; import { mdiXml } from "@mdi/js";
import Icon from "@mdi/react"; import Icon from "@mdi/react";
import PictureAsPdfIcon from "@mui/icons-material/PictureAsPdf"; import PictureAsPdfIcon from "@mui/icons-material/PictureAsPdf";
import { IconButton } from "@mui/material"; import { IconButton, Tooltip } from "@mui/material";
import f3, { f3Data } from "family-chart"; import f3, { f3Data } from "family-chart";
import { jsPDF } from "jspdf"; import { jsPDF } from "jspdf";
import React from "react"; import React from "react";
@ -176,12 +176,16 @@ export function ComplexFamilyTree(p: {
return ( return (
<div> <div>
<div style={{ textAlign: "right" }}> <div style={{ textAlign: "right" }}>
<Tooltip title="Exporter le graphique au format PDF">
<IconButton onClick={exportPDF}> <IconButton onClick={exportPDF}>
<PictureAsPdfIcon /> <PictureAsPdfIcon />
</IconButton> </IconButton>
</Tooltip>
<Tooltip title="Exporter le graphique au format SVG">
<IconButton onClick={exportSVG}> <IconButton onClick={exportSVG}>
<Icon path={mdiXml} size={1} /> <Icon path={mdiXml} size={1} />
</IconButton> </IconButton>
</Tooltip>
</div> </div>
<div <div
style={{ width: "100%" }} style={{ width: "100%" }}