How to change title and icon of ThemedLayoutV2
I'm using the <ThemedLayoutV2> component to handle my navigation menu. How do I change the text of the title above the menu that says "Refine Project"?
text props.text prop is set to "My Project".text prop to your desired title.<ThemedLayoutV2><ThemedLayoutV2>TitleTitle<ThemedTitleV2><ThemedTitleV2>collapsedcollapsediconiconMyLargeIconMySmallIconimport { Refine } from "@refinedev/core";
import { ThemedLayoutV2, ThemedTitleV2 } from "@refinedev/antd"; // or "@refinedev/mui", "@refinedev/mantine", "@refinedev/chakra-ui" depending on your UI framework
import { MyLargeIcon, MySmallIcon } from "./MyIcon";
const App: React.FC = () => {
return (
<Refine
// ...
>
<ThemedLayoutV2
Title={({ collapsed }) => (
<ThemedTitleV2
// collapsed is a boolean value that indicates whether the <Sidebar> is collapsed or not
collapsed={collapsed}
icon={collapsed ? <MySmallIcon /> : <MyLargeIcon />}
text="My Project"
/>
)}
>
{/* ... */}
</ThemedLayoutV2>
</Refine>
);
};