UNPKG

@procore/core-react

Version:
105 lines (104 loc) 4.54 kB
import React from 'react'; import type { GridProps } from '../Grid/Grid.types'; import type { Props } from '../_utils/types'; import type { PageAsideProps, PageBodyNavigationProps, PageComponentProps, PageFooterProps, PageHeaderProps, PageMainProps } from './PageLayout.types'; export declare const PageContext: React.Context<{ bodyRef: React.RefObject<HTMLDivElement>; footerRef: React.RefObject<HTMLDivElement>; containerRef: React.RefObject<HTMLDivElement>; navigationRef: React.RefObject<HTMLUListElement>; aside: { open: () => Promise<void>; close: () => Promise<void>; isOpen: boolean; }; }>; /** * @parent Page * @deprecated A wrapper around Grid, please use Grid instead. Page already sets * a default gutterX in context for children grid components. * * BEFORE `Page.Grid`, `Page.Row`, `Page.Column` * * AFTER `Grid` `Grid.Row` `Grid.Col` * @deprecatedSince 12 */ export declare const Grid: { ({ gutterX, ...props }: GridProps): React.JSX.Element; displayName: string; }; /** * @parent Page * @deprecated A wrapper around Grid, please use Grid instead. Page already sets * a default gutterX in context for children grid components. * * BEFORE `Page.Row` AFTER `Grid.Row` * @deprecatedSince 12 */ export declare const Row: React.ForwardRefExoticComponent<import("../Grid/Grid.types").GridRowProps & React.RefAttributes<HTMLDivElement>>; /** * @parent Page * @deprecated A wrapper around Grid, please use Grid instead. Page already sets * a default gutterX in context for children grid components. * * BEFORE `Page.Column` AFTER `Grid.Col` * @deprecatedSince 12 */ export declare const Column: React.ForwardRefExoticComponent<import("../Grid/Grid.types").GridColProps & React.RefAttributes<HTMLDivElement>>; export declare const PageBodyNavigation: React.ForwardRefExoticComponent<PageBodyNavigationProps & React.RefAttributes<HTMLUListElement>>; /** Building block elements for layout that should be used to build a common skeleton of a page. - Page - Page.Main - Page.Header - Page.Breadcrumbs - Breadcrumbs - Page.Banner - Banner - Page.Title - Title or H1 - Page.Tabs - Tabs - Page.Body - Page.Footer - Page.Aside Other helpers, such as Page.Grid, Page.Row and Page.Column are thin wrappers over Grid components and share the same API. */ export declare const Page: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>> & { Header: React.ForwardRefExoticComponent<PageHeaderProps & React.RefAttributes<HTMLDivElement>>; Banner: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>; Breadcrumbs: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>; Title: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>; Tabs: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>; Footer: React.ForwardRefExoticComponent<PageFooterProps & React.RefAttributes<HTMLDivElement>>; Body: React.ForwardRefExoticComponent<PageComponentProps & React.RefAttributes<HTMLDivElement>>; Main: React.ForwardRefExoticComponent<PageMainProps & React.RefAttributes<HTMLDivElement>>; Aside: React.ForwardRefExoticComponent<PageAsideProps & React.RefAttributes<HTMLDivElement>>; /** * @deprecated A wrapper around Grid, please use Grid instead. Page already sets * a default gutterX in context for children grid components. * * BEFORE `Page.Grid` AFTER `Grid` (or `Grid gutterX="lg"`) * @deprecatedSince 12 */ Grid: { ({ gutterX, ...props }: GridProps): React.JSX.Element; displayName: string; }; /** * @deprecated A wrapper around Grid, please use Grid instead. Page already sets * a default gutterX in context for children grid components. * * BEFORE `Page.Column` AFTER `Grid.Col` * @deprecatedSince 12 */ Column: React.ForwardRefExoticComponent<import("../Grid/Grid.types").GridColProps & React.RefAttributes<HTMLDivElement>>; /** * @deprecated A wrapper around Grid, please use Grid instead. Page already sets * a default gutterX in context for children grid components. * * BEFORE `Page.Row` AFTER `Grid.Row` * @deprecatedSince 12 */ Row: React.ForwardRefExoticComponent<import("../Grid/Grid.types").GridRowProps & React.RefAttributes<HTMLDivElement>>; };