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