chore: tooltips and locales

This commit is contained in:
dongchengjie
2024-06-26 05:33:06 +08:00
parent 709a23cf09
commit 1f422afe3d
21 changed files with 108 additions and 32 deletions

View File

@@ -1,5 +1,6 @@
import { alpha, Box, Typography } from "@mui/material";
import { InboxRounded } from "@mui/icons-material";
import { useTranslation } from "react-i18next";
interface Props {
text?: React.ReactNode;
@@ -8,6 +9,7 @@ interface Props {
export const BaseEmpty = (props: Props) => {
const { text = "Empty", extra } = props;
const { t } = useTranslation();
return (
<Box
@@ -22,7 +24,7 @@ export const BaseEmpty = (props: Props) => {
})}
>
<InboxRounded sx={{ fontSize: "4em" }} />
<Typography sx={{ fontSize: "1.25em" }}>{text}</Typography>
<Typography sx={{ fontSize: "1.25em" }}>{t(`${text}`)}</Typography>
{extra}
</Box>
);