docs/docs/reference/dashboard/page-layout/page.mdx
This component should be used to wrap all pages in the dashboard. It provides a consistent layout as well as a context for the slot-based PageBlock system.
The typical hierarchy of a page is as follows:
Example
import { Page, PageTitle, PageActionBar, PageLayout, PageBlock, Button } from '@vendure/dashboard';
const pageId = 'my-page';
export function MyPage() {
return (
<Page pageId={pageId} form={form} submitHandler={submitHandler} entity={entity}>
<PageTitle>My Page</PageTitle>
<PageActionBar>
<PageActionBarRight>
<Button>Save</Button>
</PageActionBarRight>
</PageActionBar>
<PageLayout>
<PageBlock column="main" blockId="my-block">
<div>My Block</div>
</PageBlock>
</PageLayout>
</Page>
)
}
function Page(props: Readonly<PageProps>): void
Parameters
<MemberInfo kind="parameter" type={Readonly<<a href='/reference/dashboard/page-layout/page#pageprops'>PageProps</a>>} />
The props used to configure the Page component.
interface PageProps extends ComponentProps<'div'> {
pageId?: string;
entity?: any;
form?: UseFormReturn<any>;
submitHandler?: any;
}
ComponentProps<'div'><MemberInfo kind="property" type={string} />
A string identifier for the page, e.g. "product-list", "review-detail", etc.
<MemberInfo kind="property" type={any} />
<MemberInfo kind="property" type={UseFormReturn<any>} />
<MemberInfo kind="property" type={any} />