mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-19 16:49:45 +08:00
[react-loadable]: update types for v5.4
This commit is contained in:
3
types/react-loadable/index.d.ts
vendored
3
types/react-loadable/index.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
// Type definitions for react-loadable 5.3
|
||||
// Type definitions for react-loadable 5.4
|
||||
// Project: https://github.com/thejameskyle/react-loadable#readme
|
||||
// Definitions by: Diogo Franco <https://github.com/Kovensky>
|
||||
// Oden S. <https://github.com/odensc>
|
||||
@@ -16,6 +16,7 @@ declare namespace LoadableExport {
|
||||
pastDelay: boolean;
|
||||
timedOut: boolean;
|
||||
error: any;
|
||||
retry: () => void;
|
||||
}
|
||||
|
||||
type Options<Props, Exports extends object> = OptionsWithoutRender<Props> | OptionsWithRender<Props, Exports>;
|
||||
|
||||
@@ -9,6 +9,7 @@ class LoadingComponent extends React.Component<Loadable.LoadingComponentProps> {
|
||||
{this.props.isLoading}
|
||||
{this.props.pastDelay}
|
||||
{this.props.timedOut}
|
||||
<button onClick={this.props.retry}>Retry</button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user