@itwin/itwinui-react
Version:
A react component library for iTwinUI
44 lines (43 loc) • 1.35 kB
TypeScript
import * as React from 'react';
import type { PolymorphicForwardRefComponent } from '../../utils/index.js';
type InformationPanelHeaderProps = {
/**
* Callback fired when close icon is clicked.
*
* If not specified, close icon will not be shown.
*/
onClose?: (e: React.MouseEvent) => void;
/**
* Custom header action buttons shown alongside the close button.
* @example
* actions={(
* <>
* <IconButton styleType='borderless' onClick={() => {}}><SvgEdit /></IconButton>
* <IconButton styleType='borderless' onClick={() => {}}><SvgDelete /></IconButton>
* </>
* )}
*/
actions?: React.ReactNode;
/**
* Content of the panel header.
*/
children?: React.ReactNode;
};
/**
* Header of the InformationPanel to be passed in the `header` prop.
*
* @example
* <InformationPanelHeader
* onClose={() => {}}
* actions={(
* <>
* <IconButton styleType='borderless' onClick={() => {}}><SvgEdit /></IconButton>
* <IconButton styleType='borderless' onClick={() => {}}><SvgDelete /></IconButton>
* </>
* )}
* >
* <Text variant='subheading'>InfoPanel heading</Text>
* </InformationPanelHeader>
*/
export declare const InformationPanelHeader: PolymorphicForwardRefComponent<"div", InformationPanelHeaderProps>;
export {};