UNPKG

adaptivecards-react

Version:

React.js Adaptive Cards Javascript library for HTML Clients

33 lines (32 loc) 2.17 kB
import * as PropTypes from 'prop-types'; export interface Props { payload: object; onExecuteAction?: Function; onActionSubmit?: Function; onActionOpenUrl?: Function; onActionShowCard?: Function; onError?: Function; style?: object; hostConfig?: object; } export declare const AdaptiveCard: { ({ payload, onExecuteAction, onActionSubmit, onActionOpenUrl, onActionShowCard, onError, style, hostConfig, }: Props): JSX.Element; propTypes: { /** The card schema. It must comply with the card schema. [More Info](https://docs.microsoft.com/en-us/adaptive-cards/create/cardschema) */ payload: PropTypes.Validator<object>; /** Method that will be invoked anytime a card action is executed. [More Info](https://docs.microsoft.com/en-us/adaptive-cards/display/implementingrenderer#actions) */ onExecuteAction: PropTypes.Requireable<(...args: any[]) => any>; /** Method that will be invoked when a Submit action is executed. [More Info](https://docs.microsoft.com/en-us/adaptive-cards/display/implementingrenderer#actionsubmit) */ onActionSubmit: PropTypes.Requireable<(...args: any[]) => any>; /** Method that will be invoked when an Open Url action is executed. [More Info](https://docs.microsoft.com/en-us/adaptive-cards/display/implementingrenderer#actionopenurl) */ onActionOpenUrl: PropTypes.Requireable<(...args: any[]) => any>; /** Method that will be invoked when a Show Card action is executed. [More Info](https://docs.microsoft.com/en-us/adaptive-cards/display/implementingrenderer#actionshowcard) */ onActionShowCard: PropTypes.Requireable<(...args: any[]) => any>; /** Method that will be invoked if an error is thrown while trying to render a card. */ onError: PropTypes.Requireable<(...args: any[]) => any>; /** JSX styles that will be applied to the card conatiner */ style: PropTypes.Requireable<object>; /** HostConfig. [More Info](https://docs.microsoft.com/en-us/adaptive-cards/rendering-cards/host-config) */ hostConfig: PropTypes.Requireable<object>; }; };