@sap-ux/ui-components
Version:
SAP UI Components Library
65 lines • 2.03 kB
TypeScript
import React from 'react';
import { UIIcon } from '../UIIcon/index.js';
import './UIActionCallout.scss';
export interface ActionCalloutProps {
/** The id of the element to which this GA box will point */
targetElementId: string;
/**
* If true (default) the callout will be placed relative to the target element instead of floating using position absolute
* Note: This is not a bound property and cannot be used to dynamically change the positon of the component
*/
showInline?: boolean;
/** The action details that will be rendered in the component */
actionDetail: IActionCalloutDetail;
/** The function which will be passed the command */
commandAction?(command: IActionCalloutDetail['command']): void;
/** The icon to use if provided, otherwise a default icon is applied */
icon?: UIIcon;
/** Call back function to be called on every click */
onClick?(): void;
/** Border colour */
isError?: boolean;
}
export interface IActionCalloutDetail {
linkText: string;
subText: string;
/**
* Command to be executed and parameters passed to the command
*/
command?: {
id: string;
params: object | string;
};
/**
* A http url string, command takes precedence if provided
*/
url?: string;
}
/**
*
*
*/
export declare class UIActionCallout extends React.Component<ActionCalloutProps> {
private readonly anchor;
private readonly actionDetail;
private readonly commandAction;
private readonly targetElementId;
private readonly showInline;
private readonly icon;
private readonly onClick;
private anchorClicked;
private readonly isError;
/**
* Initializes component properties.
*
* @param {ActionCalloutProps} props
*/
constructor(props: ActionCalloutProps);
private onCalloutClick;
private handleAnchorClick;
/**
* @returns {JSX.Element}
*/
render(): JSX.Element;
}
//# sourceMappingURL=UIActionCallout.d.ts.map