@openshift-console/dynamic-plugin-sdk
Version:
Provides core APIs, types and utilities used by dynamic plugins at runtime.
34 lines (33 loc) • 1.39 kB
TypeScript
import * as React from 'react';
import { PopoverProps } from '@patternfly/react-core';
import './PopoverStatus.scss';
type PopoverStatusProps = {
children?: React.ReactNode;
statusBody: React.ReactNode;
onHide?: () => void;
onShow?: () => void;
title?: string;
hideHeader?: boolean;
isVisible?: boolean;
shouldClose?: (hideFunction: any) => void;
shouldOpen?: PopoverProps['shouldOpen'];
};
/**
* Component for creating a status popover item
* @param {ReactNode} statusBody - content displayed within the popover.
* @param {function} [onHide] - (optional) function invoked when popover begins to transition out
* @param {function} [onShow] - (optional) function invoked when popover begins to appear
* @param {string} [title] - (optional) title for the popover
* @param {boolean} [hideHeader] - (optional) when true, header text is hidden
* @param {boolean} [isVisible] - (optional) when true, the popover is displayed
* @param {function} [shouldClose] - (optional) callback function invoked when the popover is closed only if isVisible is also controlled
* @param {ReactNode} [children] - (optional) children for the component
* @example
* ```tsx
* <PopoverStatus title={title} statusBody={statusBody}>
* {children}
* </PopoverStatus>
* ```
*/
declare const PopoverStatus: React.FC<PopoverStatusProps>;
export default PopoverStatus;