goobs-frontend
Version:
A comprehensive React-based libary for building modern web applications
55 lines • 2.4 kB
TypeScript
import { default as React, ReactElement, ReactNode } from 'react';
export type PanelVariant = 'sacred' | 'standard' | 'fullscreen';
export interface PanelProps extends React.HTMLAttributes<HTMLElement> {
/**
* Visual archetype. `'sacred'` (default) is the dark/gold inline-shell
* backdrop. `'standard'` is a neutral surface. `'fullscreen'` pins the
* panel to the full viewport (fixed inset:0) for takeover surfaces.
*/
variant?: PanelVariant;
children: ReactNode;
}
interface PanelComponent {
(props: PanelProps & React.RefAttributes<HTMLElement>): ReactElement | null;
displayName?: string;
Header: typeof PanelHeader;
Body: typeof PanelBody;
Footer: typeof PanelFooter;
}
export interface PanelHeaderProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
/**
* When set, a built-in BACK button (IconButton + ArrowBack icon) is
* rendered at the leading edge and invokes this handler on click.
*/
onBack?: () => void;
/** Accessible label for the back button. Default `'Back'`. */
backLabel?: string;
/** Panel title — rendered as the `aria-labelledby` target of the root. */
title: ReactNode;
/** Optional secondary line under the title. */
subtitle?: ReactNode;
/**
* Right-aligned actions slot. Consumers pass their own `<SaveButton/>` /
* `<CustomButton/>` here — Panel keeps this a generic node and never
* imports a save button itself.
*/
actions?: ReactNode;
}
declare const PanelHeader: React.ForwardRefExoticComponent<PanelHeaderProps & React.RefAttributes<HTMLDivElement>>;
export interface PanelBodyProps extends React.HTMLAttributes<HTMLDivElement> {
children: ReactNode;
}
declare const PanelBody: React.ForwardRefExoticComponent<PanelBodyProps & React.RefAttributes<HTMLDivElement>>;
export interface PanelFooterProps extends React.HTMLAttributes<HTMLDivElement> {
/**
* When true, the first child group is left-aligned and the remaining
* group is pushed to the right (margin-left:auto on the second child).
*/
split?: boolean;
children: ReactNode;
}
declare const PanelFooter: React.ForwardRefExoticComponent<PanelFooterProps & React.RefAttributes<HTMLDivElement>>;
declare const Panel: PanelComponent;
export { PanelHeader, PanelBody, PanelFooter };
export default Panel;
//# sourceMappingURL=index.d.ts.map