[ARVADOS-WORKBENCH2] updated: 1.2.0-432-g020ffe9

Git user git at public.curoverse.com
Sat Sep 22 03:04:18 EDT 2018


Summary of changes:
 src/views-components/snackbar/snackbar.tsx | 81 +++++++++++++++---------------
 1 file changed, 41 insertions(+), 40 deletions(-)

       via  020ffe99a961cbad5e4d1ff7bf85b050d5132350 (commit)
      from  afa04ca15bcaa890770a30ddb099b62f5cbe2926 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 020ffe99a961cbad5e4d1ff7bf85b050d5132350
Author: Daniel Kos <daniel.kos at contractors.roche.com>
Date:   Sat Sep 22 09:03:37 2018 +0200

    Inline ArvadosSnackbar into Snackbar
    
    Arvados-DCO-1.1-Signed-off-by: Daniel Kos <daniel.kos at contractors.roche.com>

diff --git a/src/views-components/snackbar/snackbar.tsx b/src/views-components/snackbar/snackbar.tsx
index 59dddca..388a2e0 100644
--- a/src/views-components/snackbar/snackbar.tsx
+++ b/src/views-components/snackbar/snackbar.tsx
@@ -83,46 +83,47 @@ const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
     },
 });
 
-const ArvadosSnackbar = (props: SnackbarDataProps & SnackbarEventProps & WithStyles<CssRules>) => {
-    const { classes } = props;
+// const ArvadosSnackbar =
+export const Snackbar = withStyles(styles)(connect(mapStateToProps, mapDispatchToProps)(
+    (props: SnackbarDataProps & SnackbarEventProps & WithStyles<CssRules>) => {
+        const { classes } = props;
 
-    const variants = {
-        [SnackbarKind.INFO]: [InfoIcon, classes.info],
-        [SnackbarKind.WARNING]: [WarningIcon, classes.warning],
-        [SnackbarKind.SUCCESS]: [CheckCircleIcon, classes.success],
-        [SnackbarKind.ERROR]: [ErrorIcon, classes.error]
-    };
-
-    const [Icon, cssClass] = variants[props.kind];
+        const variants = {
+            [SnackbarKind.INFO]: [InfoIcon, classes.info],
+            [SnackbarKind.WARNING]: [WarningIcon, classes.warning],
+            [SnackbarKind.SUCCESS]: [CheckCircleIcon, classes.success],
+            [SnackbarKind.ERROR]: [ErrorIcon, classes.error]
+        };
 
-    return (
-        <MaterialSnackbar
-            open={props.open}
-            message={props.message}
-            onClose={props.onClose}
-            anchorOrigin={props.anchorOrigin}
-            autoHideDuration={props.autoHideDuration}>
-            <SnackbarContent
-                className={classNames(cssClass)}
-                aria-describedby="client-snackbar"
-                message={
-                    <span id="client-snackbar" className={classes.message}>
-                        <Icon className={classNames(classes.icon, classes.iconVariant)}/>
-                        {props.message}
-                    </span>
-                }
-                action={
-                    <IconButton
-                        key="close"
-                        aria-label="Close"
-                        color="inherit"
-                        onClick={e => props.onClose && props.onClose(e, '')}>
-                        <CloseIcon className={classes.icon}/>
-                    </IconButton>
-                }
-            />
-        </MaterialSnackbar>
-    );
-};
+        const [Icon, cssClass] = variants[props.kind];
 
-export const Snackbar = withStyles(styles)(connect(mapStateToProps, mapDispatchToProps)(ArvadosSnackbar));
+        return (
+            <MaterialSnackbar
+                open={props.open}
+                message={props.message}
+                onClose={props.onClose}
+                anchorOrigin={props.anchorOrigin}
+                autoHideDuration={props.autoHideDuration}>
+                <SnackbarContent
+                    className={classNames(cssClass)}
+                    aria-describedby="client-snackbar"
+                    message={
+                        <span id="client-snackbar" className={classes.message}>
+                            <Icon className={classNames(classes.icon, classes.iconVariant)}/>
+                            {props.message}
+                        </span>
+                    }
+                    action={
+                        <IconButton
+                            key="close"
+                            aria-label="Close"
+                            color="inherit"
+                            onClick={e => props.onClose && props.onClose(e, '')}>
+                            <CloseIcon className={classes.icon}/>
+                        </IconButton>
+                    }
+                />
+            </MaterialSnackbar>
+        );
+    }
+));

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list