@trellixio/roaster-coffee
Version:
Beans' product component library
36 lines • 1.7 kB
TypeScript
import * as React from 'react';
import { PolymorphicComponentPropWithRef } from '@/types';
export declare type BreadcrumbsItem<C extends React.ElementType> = PolymorphicComponentPropWithRef<C, {
/** Additional CSS classes added to the BreadcrumbItem root element */
className?: string;
/** Menu BreadcrumbItem content */
content: React.ReactNode;
}>;
export interface PageProps {
/** The title of the page (required). */
title: string;
/** The child elements to be rendered within the page (optional). */
children?: React.ReactNode;
/**
* An array of breadcrumb items to be displayed at the top of the page (optional).
* Each breadcrumb item should have a `content` and a `url` property.
*/
breadcrumbs?: BreadcrumbsItem<any>[];
/** The primary action element to be displayed in the header of the page (optional). */
primaryAction?: React.ReactNode;
/** The secondary action element to be displayed in the header of the page (optional). */
secondaryAction?: React.ReactNode;
/** CSS class names to be applied to the page element (optional). */
className?: string;
/**
* The size of the page (optional).
* - 'full': render the page in full width
* - 'medium': render the page in a medium (670px) size
* - 'large': render the page in a large (1150px) size
*/
size?: 'full' | 'medium' | 'large';
/** Indicate if loading spinner should be displayed aside the page title */
loading?: boolean;
}
export declare function Page({ title, className, size, children, breadcrumbs, primaryAction, secondaryAction, loading, }: PageProps): React.JSX.Element;
//# sourceMappingURL=Page.d.ts.map