1 | import * as React from 'react';
|
2 | import { ExtensionsProps } from '../context';
|
3 | import { ErrorLike } from '../errors';
|
4 | import { ConfigurationSubject, ConfiguredSubjectOrError, Settings } from '../settings';
|
5 | import { ConfiguredExtension } from './extension';
|
6 | declare const LOADING: 'loading';
|
7 | interface Props<S extends ConfigurationSubject, C extends Settings> extends ExtensionsProps<S, C> {
|
8 |
|
9 | extension: ConfiguredExtension;
|
10 |
|
11 | subject: ConfiguredSubjectOrError<ConfigurationSubject, Settings>;
|
12 | disabled?: boolean;
|
13 | className?: string;
|
14 | |
15 |
|
16 |
|
17 |
|
18 | confirm?: () => boolean;
|
19 |
|
20 | onUpdate: () => void;
|
21 | }
|
22 | interface State {
|
23 |
|
24 | operationResultOrError: typeof LOADING | null | ErrorLike;
|
25 | }
|
26 |
|
27 | export declare class ExtensionAddButton<S extends ConfigurationSubject, C extends Settings> extends React.PureComponent<Props<S, C>, State> {
|
28 | state: State;
|
29 | private clicks;
|
30 | private subscriptions;
|
31 | componentDidMount(): void;
|
32 | componentWillUnmount(): void;
|
33 | render(): JSX.Element | null;
|
34 | private onClick;
|
35 | private addExtensionForSubject;
|
36 | }
|
37 | export {};
|