X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/6d1c41d6fd83824669cd1a6d714ea6da1ae7ab4c..ee9d1e39b5d469a827be5a719c9c0860914ab2a8:/services/workbench2/src/components/copy-to-clipboard-snackbar/copy-to-clipboard-snackbar.tsx

diff --git a/services/workbench2/src/components/copy-to-clipboard-snackbar/copy-to-clipboard-snackbar.tsx b/services/workbench2/src/components/copy-to-clipboard-snackbar/copy-to-clipboard-snackbar.tsx
index 3b2ff68a33..586bb13b1e 100644
--- a/services/workbench2/src/components/copy-to-clipboard-snackbar/copy-to-clipboard-snackbar.tsx
+++ b/services/workbench2/src/components/copy-to-clipboard-snackbar/copy-to-clipboard-snackbar.tsx
@@ -2,9 +2,9 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import React from "react";
-import { connect, DispatchProp } from "react-redux";
-import { StyleRulesCallback, Tooltip, WithStyles, withStyles } from "@material-ui/core";
+import React from 'react';
+import { connect, DispatchProp } from 'react-redux';
+import { StyleRulesCallback, Tooltip, WithStyles, withStyles } from '@material-ui/core';
 import { ArvadosTheme } from 'common/custom-theme';
 import CopyToClipboard from 'react-copy-to-clipboard';
 import { snackbarActions, SnackbarKind } from 'store/snackbar/snackbar-actions';
@@ -13,46 +13,50 @@ import { CopyIcon } from 'components/icon/icon';
 type CssRules = 'copyIcon';
 
 const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
-  copyIcon: {
-    marginLeft: theme.spacing.unit,
-    color: theme.palette.grey["500"],
-    cursor: 'pointer',
-    display: 'inline',
-    '& svg': {
-      fontSize: '1rem',
-      verticalAlign: 'middle',
-    }
-  }
+    copyIcon: {
+        marginLeft: theme.spacing.unit,
+        color: theme.palette.grey['500'],
+        cursor: 'pointer',
+        display: 'inline',
+        '& svg': {
+            fontSize: '1rem',
+            verticalAlign: 'middle',
+        },
+    },
 });
 
 interface CopyToClipboardDataProps {
-  children?: React.ReactNode;
-  value: string;
+    children?: React.ReactNode;
+    value: string;
 }
 
 type CopyToClipboardProps = CopyToClipboardDataProps & WithStyles<CssRules> & DispatchProp;
 
-export const CopyToClipboardSnackbar = connect()(withStyles(styles)(
-  class CopyToClipboardSnackbar extends React.Component<CopyToClipboardProps> {
-    onCopy = () => {
-      this.props.dispatch(snackbarActions.OPEN_SNACKBAR({
-        message: 'Copied',
-        hideDuration: 2000,
-        kind: SnackbarKind.SUCCESS
-    }));
-    };
+export const CopyToClipboardSnackbar = connect()(
+    withStyles(styles)(
+        class CopyToClipboardSnackbar extends React.Component<CopyToClipboardProps> {
+            onCopy = () => {
+                this.props.dispatch(
+                    snackbarActions.OPEN_SNACKBAR({
+                        message: 'Copied',
+                        hideDuration: 2000,
+                        kind: SnackbarKind.SUCCESS,
+                    })
+                );
+            };
 
-    render() {
-      const { children, value, classes } = this.props;
-      return (
-        <Tooltip title="Copy to clipboard">
-          <span className={classes.copyIcon}>
-            <CopyToClipboard text={value} onCopy={this.onCopy}>
-              {children || <CopyIcon />}
-            </CopyToClipboard>
-          </span>
-        </Tooltip>
-      );
-    }
-  }
-));
+            render() {
+                const { children, value, classes } = this.props;
+                return (
+                    <Tooltip title='Copy to clipboard'>
+                        <span className={classes.copyIcon}>
+                            <CopyToClipboard text={value} onCopy={this.onCopy}>
+                                {children || <CopyIcon />}
+                            </CopyToClipboard>
+                        </span>
+                    </Tooltip>
+                );
+            }
+        }
+    )
+);
