UNPKG

@sap-ux/ui-components

Version:
65 lines 1.95 kB
import React from 'react'; import { UIIcon } from '../UIIcon'; 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 anchor; private actionDetail; private commandAction; private targetElementId; private showInline; private icon; private onClick; private anchorClicked; private 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