The UserAccountHeader component in the Dashboard app has been updated to include child props. Now, it allows the rendering of additional components between the PageHeader tags. This enhances its versatility and promotes code reuse in different contexts within the app.
21 lines
481 B
TypeScript
21 lines
481 B
TypeScript
import { PageHeader } from '@kit/ui/page';
|
|
|
|
import UserLayoutMobileNavigation from './user-layout-mobile-navigation';
|
|
|
|
export function UserAccountHeader(
|
|
props: React.PropsWithChildren<{
|
|
title: string | React.ReactNode;
|
|
description?: string | React.ReactNode;
|
|
}>,
|
|
) {
|
|
return (
|
|
<PageHeader
|
|
title={props.title}
|
|
description={props.description}
|
|
mobileNavigation={<UserLayoutMobileNavigation />}
|
|
>
|
|
{props.children}
|
|
</PageHeader>
|
|
);
|
|
}
|