aboutsummaryrefslogtreecommitdiffstats
path: root/packages/ui/src/infobox/index.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/ui/src/infobox/index.tsx')
-rw-r--r--packages/ui/src/infobox/index.tsx7
1 files changed, 7 insertions, 0 deletions
diff --git a/packages/ui/src/infobox/index.tsx b/packages/ui/src/infobox/index.tsx
index 1a442a733..9066a623e 100644
--- a/packages/ui/src/infobox/index.tsx
+++ b/packages/ui/src/infobox/index.tsx
@@ -11,6 +11,7 @@ interface IProps extends IWithStyle {
11 type?: string; 11 type?: string;
12 dismissable?: boolean; 12 dismissable?: boolean;
13 onDismiss?: () => void; 13 onDismiss?: () => void;
14 onUnmount?: () => void;
14 ctaOnClick?: () => void; 15 ctaOnClick?: () => void;
15 ctaLabel?: string; 16 ctaLabel?: string;
16 ctaLoading?: boolean; 17 ctaLoading?: boolean;
@@ -46,6 +47,7 @@ const styles = (theme: Theme) => ({
46 wrapper: { 47 wrapper: {
47 position: 'relative', 48 position: 'relative',
48 overflow: 'hidden', 49 overflow: 'hidden',
50 height: 'auto',
49 }, 51 },
50 infobox: { 52 infobox: {
51 alignItems: 'center', 53 alignItems: 'center',
@@ -129,6 +131,11 @@ class InfoboxComponent extends Component<IProps, IState> {
129 }, 3000); 131 }, 3000);
130 } 132 }
131 133
134 componentWillUnmount(): void {
135 const { onUnmount } = this.props;
136 if (onUnmount) onUnmount();
137 }
138
132 render() { 139 render() {
133 const { 140 const {
134 classes, 141 classes,