UNPKG

@hypothesis/frontend-shared

Version:

Shared components, styles and utilities for Hypothesis projects

30 lines (29 loc) 984 B
/** * @typedef PanelProps * @prop {import("preact").ComponentChildren} children * @prop {string} [icon] - Name of optional icon to render in header * @prop {() => void} [onClose] - handler for closing the panel; if provided, * will render a close button that invokes this onClick * @prop {string} title */ /** * Render a "panel"-like interface with a title and optional icon and/or * close button. * * @deprecated - Use re-implemented Panel component in the layout group * @param {PanelProps} props */ export function Panel({ children, icon, onClose, title }: PanelProps): import("preact").JSX.Element; export type PanelProps = { children: import("preact").ComponentChildren; /** * - Name of optional icon to render in header */ icon?: string | undefined; /** * - handler for closing the panel; if provided, * will render a close button that invokes this onClick */ onClose?: (() => void) | undefined; title: string; };