aboutsummaryrefslogtreecommitdiffstats
path: root/webui/src/Label.js
diff options
context:
space:
mode:
authorQuentin Gliech <quentingliech@gmail.com>2018-08-18 17:00:53 -0400
committerSandhose <quentingliech@gmail.com>2018-08-19 23:14:45 +0200
commitbb4ebed08c3f1b1a7ba9968ede75a07f1705d2df (patch)
treedd6998679330f1814001011c339ba7ee1da876d9 /webui/src/Label.js
parent8575abf285d1dd71990b619fbdf3cd44dbc48e75 (diff)
downloadgit-bug-bb4ebed08c3f1b1a7ba9968ede75a07f1705d2df.tar.gz
webui: Format everything with prettier
Diffstat (limited to 'webui/src/Label.js')
-rw-r--r--webui/src/Label.js32
1 files changed, 16 insertions, 16 deletions
diff --git a/webui/src/Label.js b/webui/src/Label.js
index 8981142d..e7c25c23 100644
--- a/webui/src/Label.js
+++ b/webui/src/Label.js
@@ -1,11 +1,11 @@
-import React from "react";
-import { withStyles } from "@material-ui/core/styles";
+import React from 'react';
+import { withStyles } from '@material-ui/core/styles';
import {
getContrastRatio,
- darken
-} from "@material-ui/core/styles/colorManipulator";
-import * as allColors from "@material-ui/core/colors";
-import { common } from "@material-ui/core/colors";
+ darken,
+} from '@material-ui/core/styles/colorManipulator';
+import * as allColors from '@material-ui/core/colors';
+import { common } from '@material-ui/core/colors';
// JS's modulo returns negative numbers sometimes.
// This ensures the result is positive.
@@ -21,7 +21,7 @@ const labelColors = Object.entries(allColors)
// Generate a hash (number) from a string
const hash = string =>
- string.split("").reduce((a, b) => ((a << 5) - a + b.charCodeAt(0)) | 0, 0);
+ string.split('').reduce((a, b) => ((a << 5) - a + b.charCodeAt(0)) | 0, 0);
// Get the background color from the label
const getColor = label =>
@@ -36,7 +36,7 @@ const getTextColor = background =>
const _genStyle = background => ({
backgroundColor: background,
color: getTextColor(background),
- borderBottomColor: darken(background, 0.2)
+ borderBottomColor: darken(background, 0.2),
});
// Generate a style object (text, background and border colors) from the label
@@ -45,14 +45,14 @@ const genStyle = label => _genStyle(getColor(label));
const styles = theme => ({
label: {
...theme.typography.body2,
- padding: "0 6px",
- fontSize: "0.9em",
- margin: "0 1px",
- borderRadius: "3px",
- display: "inline-block",
- borderBottom: "solid 1.5px",
- verticalAlign: "bottom"
- }
+ padding: '0 6px',
+ fontSize: '0.9em',
+ margin: '0 1px',
+ borderRadius: '3px',
+ display: 'inline-block',
+ borderBottom: 'solid 1.5px',
+ verticalAlign: 'bottom',
+ },
});
const Label = ({ label, classes }) => (