UNPKG

988 BTypeScriptView Raw
1import * as React from 'react';
2import { BearerInstance } from '@bearer/js';
3interface IBearerProviderProps {
4 clientId: string;
5 domObserver?: boolean;
6 integrationHost?: string;
7 initialContext?: any;
8 onUpdate?(currentState: any): void;
9}
10export interface IBearerContextValue {
11 bearer: BearerInstance;
12 state: any;
13 handlePropUpdates?(e: any): void;
14}
15export declare const BearerContext: React.Context<IBearerContextValue>;
16interface IBearerProviderState {
17 bearer: BearerInstance;
18 integrationState: any;
19}
20export default class BearerProvider extends React.Component<IBearerProviderProps, IBearerProviderState> {
21 constructor(props: IBearerProviderProps);
22 render(): JSX.Element;
23 componentWillReceiveProps(newProps: IBearerProviderProps, oldProps: IBearerProviderProps): void;
24 componentDidUpdate(_prevProps: IBearerProviderProps, prevState: any): void;
25 private readonly handlePropUpdates;
26 private initBearerFromProps;
27}
28export {};