import React from "react"; import { useLink, useRefineOptions } from "@refinedev/core"; import MuiLink from "@mui/material/Link"; import SvgIcon from "@mui/material/SvgIcon"; import Typography from "@mui/material/Typography"; import type { RefineLayoutThemedTitleProps } from "../types"; export const ThemedTitle: React.FC = ({ collapsed, wrapperStyles, icon: iconFromProps, text: textFromProps, }) => { const { title: { icon: defaultIcon, text: defaultText } = {}, } = useRefineOptions(); const icon = typeof iconFromProps === "undefined" ? defaultIcon : iconFromProps; const text = typeof textFromProps === "undefined" ? defaultText : textFromProps; const Link = useLink(); return ( {icon} {!collapsed && ( {text} )} ); };