chore(v2): upgrade devDependencies (#2538)

* chore(v2): upgrade devDependencies

* chore(v2): upgrade devDependencies

* chore: prettier
This commit is contained in:
Yangshun Tay 2020-04-05 19:07:44 +08:00 committed by GitHub
parent ea8c916528
commit b07507c9cc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
148 changed files with 2385 additions and 1975 deletions

View file

@ -65,11 +65,11 @@ function ColorGenerator({children, minHeight, url}) {
const [shades, setShades] = useState(COLOR_SHADES);
const color = Color('#' + baseColor);
const adjustedColors = Object.keys(shades)
.map(shade => ({
.map((shade) => ({
...shades[shade],
variableName: shade,
}))
.map(value => ({
.map((value) => ({
...value,
hex: color.darken(value.adjustment).hex(),
}));
@ -84,7 +84,7 @@ function ColorGenerator({children, minHeight, url}) {
id="primary_color"
className={styles.input}
defaultValue={baseColor}
onChange={event => {
onChange={(event) => {
const colorValue = event.target.value;
try {
Color('#' + colorValue);
@ -107,7 +107,7 @@ function ColorGenerator({children, minHeight, url}) {
<tbody>
{adjustedColors
.sort((a, b) => a.displayOrder - b.displayOrder)
.map(value => {
.map((value) => {
const {variableName, adjustment, adjustmentInput, hex} = value;
return (
<tr key={variableName}>
@ -134,7 +134,7 @@ function ColorGenerator({children, minHeight, url}) {
className={styles.input}
type="number"
value={adjustmentInput}
onChange={event => {
onChange={(event) => {
const newValue = parseFloat(event.target.value);
setShades({
...shades,
@ -163,7 +163,7 @@ function ColorGenerator({children, minHeight, url}) {
<CodeBlock className="css">
{adjustedColors
.sort((a, b) => a.codeOrder - b.codeOrder)
.map(value => `${value.variableName}: ${value.hex.toLowerCase()};`)
.map((value) => `${value.variableName}: ${value.hex.toLowerCase()};`)
.join('\n')}
</CodeBlock>
</div>