mirror of
https://github.com/ritz078/transform.git
synced 2026-11-21 00:32:56 +03:00
hide success banners after 2 seconds
This commit is contained in:
1 parent
2204774788
commit
eca69b925d
1 file changed
+9
@@ -201,6 +201,15 @@ export default class ConversionPanel extends PureComponent {
|
||||
scrollbarStyle: null
|
||||
};
|
||||
|
||||
// hide success footer bannner after 2 seconds. Let other types be visible until fixed.
|
||||
clearTimeout(this.footerTimeout);
|
||||
if (infoType === "success") {
|
||||
this.footerTimeout = setTimeout(() => this.setState({
|
||||
info: "",
|
||||
infoType: ""
|
||||
}), 2000);
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="wrapper">
|
||||
<style jsx>{`
|
||||
|
||||
Reference in new issue
Block a user