Skip to content

Commit e28b760

Browse files
authored
Add prettier and add make symlink for githooks (#42)
1 parent 8d0d6d1 commit e28b760

40 files changed

+188
-157
lines changed

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
flow-typed/*
22
*.test.es6.js
3+
dist/
4+
node_modules/

.eslintrc.js

Lines changed: 49 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,58 @@
11
const path = require('path')
22

33
module.exports = {
4-
"extends": [
5-
"standard",
6-
"plugin:flowtype/recommended",
7-
"plugin:react/recommended"
4+
extends: [
5+
'standard',
6+
'plugin:flowtype/recommended',
7+
'plugin:react/recommended',
8+
'prettier'
89
],
9-
"parser": "babel-eslint",
10-
"settings": {
11-
"flowtype": {
12-
"onlyFilesWithFlowAnnotation": true
10+
parser: 'babel-eslint',
11+
settings: {
12+
flowtype: {
13+
onlyFilesWithFlowAnnotation: true
1314
}
1415
},
15-
"plugins": [
16-
"standard",
17-
"flowtype",
18-
"promise",
19-
"import",
20-
"react",
21-
"jsx-a11y"
22-
],
23-
"env": {
24-
"mocha": true,
25-
"node": true,
26-
"browser": true,
27-
"es6": true,
28-
"jquery": true
16+
plugins: ['standard', 'flowtype', 'promise', 'import', 'react', 'jsx-a11y'],
17+
env: {
18+
mocha: true,
19+
node: true,
20+
browser: true,
21+
es6: true,
22+
jquery: true
2923
},
30-
"globals": {
31-
"expect": false,
32-
"jest": false
24+
globals: {
25+
expect: false,
26+
jest: false
3327
},
34-
"rules": {
35-
"import/extensions": 0,
36-
"no-useless-escape": 0,
37-
"no-useless-return": 0,
38-
"camelcase": 0,
39-
"prefer-const": 1,
40-
"react/prop-types": [2, { ignore: ['className'] }],
41-
"no-multi-spaces": [2, { "ignoreEOLComments": true }],
42-
"import/no-webpack-loader-syntax": 0,
43-
"no-use-before-define": [0],
44-
"no-duplicate-imports": 0,
45-
"react/no-deprecated": 0,
46-
"semi": ["error", "never"],
47-
"quotes": ["error", "single"],
48-
"comma-dangle": "off",
49-
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }],
50-
"jsx-a11y/no-static-element-interactions": "off",
51-
"jsx-a11y/img-has-alt": [0],
52-
"jsx-a11y/href-no-hash": "off",
53-
"jsx-a11y/anchor-is-valid": ["warn", { "aspects": ["invalidHref"] }],
54-
"import/no-extraneous-dependencies": ["error", {
55-
"devDependencies": true,
56-
"optionalDependencies": false,
57-
"peerDependencies": false,
58-
"packageDir": path.join(__dirname)
59-
}]
28+
rules: {
29+
'import/extensions': 0,
30+
'no-useless-escape': 0,
31+
'no-useless-return': 0,
32+
camelcase: 0,
33+
'prefer-const': 1,
34+
'react/prop-types': [2, { ignore: ['className'] }],
35+
'no-multi-spaces': [2, { ignoreEOLComments: true }],
36+
'import/no-webpack-loader-syntax': 0,
37+
'no-use-before-define': [0],
38+
'no-duplicate-imports': 0,
39+
'react/no-deprecated': 0,
40+
semi: ['error', 'never'],
41+
quotes: ['error', 'single', { avoidEscape: true }],
42+
'comma-dangle': 'off',
43+
'react/jsx-filename-extension': [1, { extensions: ['.js', '.jsx'] }],
44+
'jsx-a11y/no-static-element-interactions': 'off',
45+
'jsx-a11y/img-has-alt': [0],
46+
'jsx-a11y/href-no-hash': 'off',
47+
'jsx-a11y/anchor-is-valid': ['warn', { aspects: ['invalidHref'] }],
48+
'import/no-extraneous-dependencies': [
49+
'error',
50+
{
51+
devDependencies: true,
52+
optionalDependencies: false,
53+
peerDependencies: false,
54+
packageDir: path.join(__dirname)
55+
}
56+
]
6057
}
61-
};
58+
}

.github/workflows/build-website.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,23 @@ on:
77
branches: [ main ]
88

99
jobs:
10+
lint:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout 🛎️
15+
uses: actions/checkout@master
16+
17+
- name: Setup Node 🔧
18+
uses: actions/setup-node@v3
19+
with:
20+
node-version: '14'
21+
22+
- name: Run lint
23+
run: |
24+
yarn
25+
make lint
26+
1027
build:
1128
runs-on: ubuntu-latest
1229

.prettierrc.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"singleQuote": true,
3+
"semi": false,
4+
"trailingComma": "none"
5+
}

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
githooks:
2+
rm -rf $(PWD)/.git/hooks
3+
ln -s $(PWD)/hooks $(PWD)/.git/hooks
4+
5+
lint:
6+
yarn eslint --config .eslintrc.js --ignore-path .eslintignore .

components/Icons.es6.js

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1721,23 +1721,23 @@ function Bank ({ className, width, height, viewBox, color }) {
17211721
)
17221722
}
17231723

1724-
function Card ({ className, width="21", height="14", viewBox="0 0 21 14", color }) {
1724+
function Card ({ className, width='21', height='14', viewBox='0 0 21 14', color }) {
17251725
return (
17261726
<svg className={className} width={width} height={height} viewBox={viewBox} fill="none" xmlns="http://www.w3.org/2000/svg">
17271727
<path d="M19.98 0H1.02C.45 0 0 .4 0 .9v11.95c0 .5.45.9 1.02.9h18.96c.57 0 1.02-.4 1.02-.9V.9c0-.5-.45-.9-1.02-.9zM16.5 2.6c-.1-.14-.05-.32.1-.41a.4.4 0 01.49.07 3.46 3.46 0 010 4.33.4.4 0 01-.48.08c-.16-.09-.2-.27-.11-.4a2.93 2.93 0 000-3.67zm-1.05.9c-.1-.14-.05-.32.1-.4a.35.35 0 01.45.1c.6.84.6 1.92 0 2.77a.34.34 0 01-.27.14.35.35 0 01-.18-.05.3.3 0 01-.14-.18.27.27 0 01.04-.22c.47-.66.47-1.5 0-2.16zm-1.07.63c-.07-.15-.02-.35.12-.43.14-.08.31-.02.38.13.23.47.23 1.03 0 1.5a.28.28 0 01-.24.17c-.1 0-.2-.06-.25-.15a.36.36 0 010-.33c.13-.27.13-.6 0-.89zM2.8 2.75c0-.17.16-.3.35-.3h3.5c.2 0 .35.13.35.3v2.14c0 .17-.16.3-.35.3h-3.5c-.2 0-.35-.13-.35-.3V2.75zm9.11 7.94H3.14c-.19 0-.34-.14-.34-.3 0-.18.15-.31.34-.31h8.77c.19 0 .34.13.34.3 0 .17-.15.3-.34.3zm1.56-5.8c-.28 0-.52-.2-.52-.46 0-.25.24-.46.53-.46.28 0 .52.2.52.46 0 .25-.24.46-.53.46zm4.38 5.8h-3.5c-.2 0-.35-.14-.35-.3 0-.18.16-.31.35-.31h3.5c.2 0 .35.13.35.3 0 .17-.16.3-.35.3z" fill={color}/>
17281728
</svg>
17291729
)
17301730
}
17311731

1732-
function Contract ({ className, width="17", height="16", viewBox="0 0 17 16", color }) {
1732+
function Contract ({ className, width='17', height='16', viewBox='0 0 17 16', color }) {
17331733
return (
17341734
<svg className={className} width={width} height={height} viewBox={viewBox} fill="none" xmlns="http://www.w3.org/2000/svg">
17351735
<path fillRule="evenodd" clipRule="evenodd" d="M3.906 4.726c-.733 1.219-1.14 2.774-.792 4.495a1 1 0 1 1-1.96.397c-.462-2.279.085-4.339 1.038-5.923C3.131 2.135 4.51.964 5.831.497 6.488.264 7.243.17 7.936.434c.75.286 1.238.918 1.426 1.73.177.766.095 1.698-.199 2.76-.238.863-.629 1.861-1.196 3.006.182-.114.37-.244.553-.385a9.251 9.251 0 0 1 1.358-.88c.378-.194.88-.403 1.367-.38.274.012.665.107.955.454.283.338.316.73.294 1-.041.497-.307 1.046-.639 1.59-.113.185-.209.348-.287.489.139-.028.298-.064.479-.11.817-.211 1.98-.601 3.594-1.222a1 1 0 0 1 .718 1.867c-1.637.63-2.884 1.052-3.814 1.291-.465.12-.875.2-1.23.233-.338.032-.711.03-1.054-.086-.392-.132-.753-.42-.908-.89-.13-.396-.062-.776.01-1.028.06-.21.151-.431.26-.655-.406.302-.83.565-1.234.77-.426.215-.896.397-1.334.45a1.744 1.744 0 0 1-.803-.075 1.299 1.299 0 0 1-.784-.766 1.598 1.598 0 0 1-.037-.942 3.34 3.34 0 0 1 .318-.79c.774-1.437 1.24-2.584 1.486-3.473.25-.902.25-1.466.178-1.778-.06-.262-.152-.297-.187-.31h-.002c-.09-.035-.323-.064-.727.078-.802.284-1.843 1.101-2.591 2.344zm7.371 5.736.002-.01a.067.067 0 0 1-.002.01zM6.794 8.454H6.8h-.006zm.581.672zM1 15a1 1 0 0 1 1-1h14a1 1 0 1 1 0 2H2a1 1 0 0 1-1-1z" fill={color}/>
17361736
</svg>
17371737
)
17381738
}
17391739

1740-
function MinusCircle ({ className, width="16", height="16", viewBox="0 0 16 16", color }) {
1740+
function MinusCircle ({ className, width='16', height='16', viewBox='0 0 16 16', color }) {
17411741
return (
17421742
<svg className={className} width={width} height={height} viewBox={viewBox} fill="none" xmlns="http://www.w3.org/2000/svg">
17431743
<path d="M8 0C3.6 0 0 3.6 0 8C0 12.4 3.6 16 8 16C12.4 16 16 12.4 16 8C16 3.6 12.4 0 8 0Z" fill={color}/>
@@ -1746,15 +1746,15 @@ function MinusCircle ({ className, width="16", height="16", viewBox="0 0 16 16",
17461746
)
17471747
}
17481748

1749-
function RepeatCircle ({ className, width="16", height="16", viewBox="0 0 16 16", color }) {
1749+
function RepeatCircle ({ className, width='16', height='16', viewBox='0 0 16 16', color }) {
17501750
return (
17511751
<svg className={className} width={width} height={height} viewBox={viewBox} fill="none" xmlns="http://www.w3.org/2000/svg">
17521752
<path fillRule="evenodd" clipRule="evenodd" d="M0 8C0 3.6 3.6 0 8 0C12.4 0 16 3.6 16 8C16 12.4 12.4 16 8 16C3.6 16 0 12.4 0 8ZM11.8067 4.01424C11.8389 4.00795 11.8723 4.01135 11.9027 4.024C11.933 4.03672 11.959 4.05812 11.9772 4.08551C11.9955 4.1129 12.0053 4.14507 12.0053 4.178V7.58C12.0055 7.60193 12.0013 7.62368 11.993 7.64399C11.9847 7.66429 11.9724 7.68273 11.9569 7.69824C11.9414 7.71375 11.923 7.72602 11.9027 7.73434C11.8824 7.74265 11.8606 7.74684 11.8387 7.74666H11.82L8.72667 7.404C8.69531 7.40075 8.66553 7.38861 8.64084 7.369C8.61616 7.3494 8.59759 7.32314 8.58733 7.29333C8.57716 7.26369 8.57552 7.23179 8.58259 7.20126C8.58967 7.17074 8.60517 7.14281 8.62733 7.12066L9.75733 6C9.27337 5.56939 8.64779 5.33207 8 5.33333C7.54545 5.33333 7.09844 5.44952 6.70143 5.67087C6.30441 5.89222 5.97057 6.21138 5.7316 6.59805C5.49263 6.98471 5.35646 7.42604 5.33603 7.88013C5.3156 8.33422 5.41158 8.786 5.61486 9.19256C5.81814 9.59913 6.12197 9.94698 6.49751 10.2031C6.87304 10.4592 7.3078 10.6151 7.76052 10.6559C8.21323 10.6967 8.66887 10.6211 9.08416 10.4363C9.49944 10.2515 9.8606 9.96364 10.1333 9.59999C10.2394 9.45855 10.3974 9.36503 10.5724 9.34003C10.6591 9.32765 10.7473 9.33246 10.8321 9.35419C10.9169 9.37591 10.9966 9.41413 11.0667 9.46666C11.2081 9.57275 11.3016 9.73068 11.3266 9.90571C11.3516 10.0807 11.3061 10.2585 11.2 10.4C10.7909 10.9455 10.2492 11.3773 9.62624 11.6545C9.0033 11.9317 8.31985 12.0451 7.64078 11.9838C6.96171 11.9226 6.30956 11.6888 5.74626 11.3046C5.18296 10.9205 4.72721 10.3987 4.42229 9.78885C4.11737 9.17901 3.9734 8.50134 4.00404 7.8202C4.03469 7.13906 4.23894 6.47707 4.5974 5.89707C4.95585 5.31707 5.45662 4.83833 6.05214 4.50631C6.64766 4.17428 7.31817 4 8 4C9.0046 3.9978 9.97245 4.37769 10.7073 5.06266L11.7213 4.05933C11.7447 4.03621 11.7744 4.02052 11.8067 4.01424Z" fill={color}/>
17531753
</svg>
17541754
)
17551755
}
17561756

1757-
function BadgeCard ({ className, width="16", height="16", viewBox="0 0 16 16", color }) {
1757+
function BadgeCard ({ className, width='16', height='16', viewBox='0 0 16 16', color }) {
17581758
return (
17591759
<svg className={className} width={width} height={height} viewBox={viewBox} fill="none" xmlns="http://www.w3.org/2000/svg">
17601760
<path fillRule="evenodd" clipRule="evenodd" d="M15 5H11V3C11 1.3 9.7 0 8 0C6.3 0 5 1.3 5 3V5H1C0.4 5 0 5.4 0 6V15C0 15.6 0.4 16 1 16H15C15.6 16 16 15.6 16 15V6C16 5.4 15.6 5 15 5ZM7 3C7 2.4 7.4 2 8 2C8.6 2 9 2.4 9 3V5H7V3ZM2 7V14H14V7H2Z" fill={color}/>
@@ -1765,7 +1765,7 @@ function BadgeCard ({ className, width="16", height="16", viewBox="0 0 16 16", c
17651765
)
17661766
}
17671767

1768-
function HeadphonesMic ({ className, width="16", height="16", color }) {
1768+
function HeadphonesMic ({ className, width='16', height='16', color }) {
17691769
return (
17701770
<svg className={className} width={width} height={height} viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
17711771
<path d="M4 17.584V19C4 21.209 5.791 23 8 23H12" stroke={color} strokeWidth="2" strokeMiterlimit="10"/>
@@ -1776,15 +1776,15 @@ function HeadphonesMic ({ className, width="16", height="16", color }) {
17761776
)
17771777
}
17781778

1779-
function CheckmarkLarge ({ className, width="16", height="16", viewBox="0 0 16 16", color="#84839C" }) {
1779+
function CheckmarkLarge ({ className, width='16', height='16', viewBox='0 0 16 16', color='#84839C' }) {
17801780
return (
17811781
<svg className={className} width={width} height={height} viewBox={viewBox} fill="none" xmlns="http://www.w3.org/2000/svg">
17821782
<path d="M2 8l4 4 8-8" stroke={color} strokeWidth="2" strokeLinecap="square"/>
17831783
</svg>
17841784
)
17851785
}
17861786

1787-
function NoticeOutlined ({ className, width="16", height="16", viewBox="0 0 16 16", color="#84839C" }) {
1787+
function NoticeOutlined ({ className, width='16', height='16', viewBox='0 0 16 16', color='#84839C' }) {
17881788
return (
17891789
<svg className={className} width={width} height={height} viewBox={viewBox} fill="none" xmlns="http://www.w3.org/2000/svg">
17901790
<path d="M15 8c0 3.848-3.152 7-7 7s-7-3.152-7-7 3.152-7 7-7 7 3.152 7 7z" stroke={color} strokeWidth="2"/>
@@ -1793,15 +1793,15 @@ function NoticeOutlined ({ className, width="16", height="16", viewBox="0 0 16 1
17931793
)
17941794
}
17951795

1796-
function Archive ({ className, width="16", height="16", viewBox="0 0 16 16", color="#84839C" }) {
1796+
function Archive ({ className, width='16', height='16', viewBox='0 0 16 16', color='#84839C' }) {
17971797
return (
17981798
<svg className={className} xmlns="http://www.w3.org/2000/svg" fill="none" width={width} height={height} viewBox={viewBox}>
17991799
<path fill={color} d="M15.977 4.887a.974.974 0 0 0-.04-.2.91.91 0 0 0-.089-.186 1.03 1.03 0 0 0-.048-.1l-3-4A1 1 0 0 0 12 0H4a1 1 0 0 0-.8.4l-3 4a1.047 1.047 0 0 0-.048.1.892.892 0 0 0-.089.187.957.957 0 0 0-.04.2A.885.885 0 0 0 0 5v9a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V5a.87.87 0 0 0-.023-.113ZM8 13.5 5 10h2V7h2v3h2l-3 3.5ZM3 4l1.5-2h7L13 4H3Z"/>
18001800
</svg>
18011801
)
18021802
}
18031803

1804-
function Questionnaire ({ className, width="16", height="16", viewBox="0 0 16 16", color="#84839C" }) {
1804+
function Questionnaire ({ className, width='16', height='16', viewBox='0 0 16 16', color='#84839C' }) {
18051805
return (
18061806
<svg className={className} width={width} height={height} viewBox={viewBox} fill="none" xmlns="http://www.w3.org/2000/svg">
18071807
<path d="M5.632 1.23H.75A.75.75 0 0 0 0 1.981v4.881c0 .415.336.751.75.751h4.882a.75.75 0 0 0 .75-.75V1.98a.75.75 0 0 0-.75-.75ZM10.138 17h4.88a.75.75 0 0 0 .752-.75v-4.882a.75.75 0 0 0-.751-.75h-4.881a.75.75 0 0 0-.751.75v4.881a.75.75 0 0 0 .75.751ZM5.632 10.617H.75a.75.75 0 0 0-.751.751v4.881A.75.75 0 0 0 .75 17h4.882a.75.75 0 0 0 .75-.75v-4.882a.75.75 0 0 0-.75-.75Z" fill={color}/>
@@ -1810,7 +1810,7 @@ function Questionnaire ({ className, width="16", height="16", viewBox="0 0 16 16
18101810
)
18111811
}
18121812

1813-
function Upload ({ className, width="16", height="16", viewBox="0 0 16 16", color="#84839C" }) {
1813+
function Upload ({ className, width='16', height='16', viewBox='0 0 16 16', color='#84839C' }) {
18141814
return (
18151815
<svg className={className} width={width} height={height} viewBox={viewBox} fill="none" xmlns="http://www.w3.org/2000/svg">
18161816
<path d="M1.333 15.667h13.334" stroke={color} strokeWidth="2" strokeLinecap="square"/>
@@ -1819,7 +1819,7 @@ function Upload ({ className, width="16", height="16", viewBox="0 0 16 16", colo
18191819
)
18201820
}
18211821

1822-
function ShareFeedback ({ className, width="16", height="16", viewBox="0 0 16 16", color="#84839C" }) {
1822+
function ShareFeedback ({ className, width='16', height='16', viewBox='0 0 16 16', color='#84839C' }) {
18231823
return (
18241824
<svg className={className} width={width} height={height} viewBox={viewBox} fill="none" xmlns="http://www.w3.org/2000/svg">
18251825
<path clipRule="evenodd" d="M11.667 1h-9.6C1.477 1 1 1.478 1 2.067v6.4c0 .588.478 1.066 1.067 1.066H4.2v3.2l3.2-3.2h4.267c.588 0 1.066-.478 1.066-1.066v-6.4c0-.59-.478-1.067-1.066-1.067Z" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
@@ -1828,7 +1828,7 @@ function ShareFeedback ({ className, width="16", height="16", viewBox="0 0 16 16
18281828
)
18291829
}
18301830

1831-
function Spaceship ({ className, width="16", height="16", viewBox="0 0 16 16", color="#84839C" }) {
1831+
function Spaceship ({ className, width='16', height='16', viewBox='0 0 16 16', color='#84839C' }) {
18321832
return (
18331833
<svg className={className} width={width} height={height} viewBox={viewBox} fill="none" xmlns="http://www.w3.org/2000/svg">
18341834
<path fillRule="evenodd" clipRule="evenodd" d="M15.295 0a.67.67 0 0 1 .703.709c-.532 9.358-8.862 12.87-8.946 12.904a.67.67 0 0 1-.727-.146L2.533 9.675a.67.67 0 0 1-.148-.723C2.42 8.867 5.892.492 15.295 0ZM8.87 7.856a1.34 1.34 0 1 0 1.026-2.477A1.34 1.34 0 0 0 8.87 7.855Z" fill={color}/>
@@ -1837,25 +1837,25 @@ function Spaceship ({ className, width="16", height="16", viewBox="0 0 16 16", c
18371837
)
18381838
}
18391839

1840-
function Zap ({ className, width='11', height='16', color="#D7D7DE", viewBox="0 0 11 16" }) {
1840+
function Zap ({ className, width='11', height='16', color='#D7D7DE', viewBox='0 0 11 16' }) {
18411841
return (
18421842
<svg width={width} height={height} viewBox={viewBox} fill="none" xmlns="http://www.w3.org/2000/svg">
18431843
<path d="M6.84479 0H3.04479C2.64479 0 2.24479 0.3 2.04479 0.7L0.0447901 7.7C-0.15521 8.4 0.34479 9 0.94479 9H4.64479L3.14479 16L10.4448 6.6C10.9448 6 10.4448 5 9.64479 5H6.64479L7.74479 1.3C7.94479 0.6 7.44479 0 6.84479 0Z" fill={color} />
18441844
</svg>
18451845
)
18461846
}
18471847

1848-
function Webpage ({className, width="16", height="16", color = "#84839C"}) {
1848+
function Webpage ({className, width='16', height='16', color = '#84839C'}) {
18491849
return (
18501850
<svg width={width} height={height} viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
1851-
<path stroke={color} d="M7 8v14M1 8h22" stroke="#695FF6" strokeWidth="2" strokeMiterlimit="10"/>
1852-
<path stroke={color} d="M23 2H1v20h22V2Z" stroke="#695FF6" strokeWidth="2" strokeMiterlimit="10" strokeLinecap="square"/>
1851+
<path stroke={color} d="M7 8v14M1 8h22" strokeWidth="2" strokeMiterlimit="10"/>
1852+
<path stroke={color} d="M23 2H1v20h22V2Z" strokeWidth="2" strokeMiterlimit="10" strokeLinecap="square"/>
18531853
<path stroke={color} d="M4 6a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM7 6a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z" fill="#695FF6"/>
18541854
</svg>
18551855
)
18561856
}
18571857

1858-
function Tip ({ className, width='12', height='16', color="#766bff", viewBox="0 0 12 16" }) {
1858+
function Tip ({ className, width='12', height='16', color='#766bff', viewBox='0 0 12 16' }) {
18591859
return (
18601860
<svg width={width} height={height} viewBox={viewBox} fill="none" xmlns="http://www.w3.org/2000/svg">
18611861
<path d="M6 0C2.7 0 0 2.7 0 6C0 8.2 1.2 10.1 3 11.2V15C3 15.6 3.4 16 4 16H8C8.6 16 9 15.6 9 15V11.2C10.8 10.1 12 8.2 12 6C12 2.7 9.3 0 6 0ZM5 14V13H7V14H5ZM7.6 9.7C7.2 9.8 7 10.2 7 10.6V12H5V10.6C5 10.2 4.8 9.8 4.4 9.7C2.9 9 2 7.6 2 6C2 3.8 3.8 2 6 2C8.2 2 10 3.8 10 6C10 7.6 9.1 9 7.6 9.7Z" fill="#695FF6"/>

components/form/button/Button.es6.js

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,14 @@ function Button ({ label, badge, primary, danger, loading, superSmall, small, la
3030
id={id}
3131
title={title}
3232
>
33-
{iconWithLabel ? (
34-
<>
35-
{icon} {label}
36-
</>
37-
) : (
38-
<>
39-
{icon || (
40-
loading ? <span className="button__spinner" /> : label
41-
)}
42-
</>
43-
)}
33+
{iconWithLabel
34+
? `${icon} ${label}`
35+
: icon || (
36+
loading
37+
? <span className="button__spinner" />
38+
: label
39+
)
40+
}
4441
{badge && (
4542
<span className="button__badge">{badge}</span>
4643
)}

components/form/datetime-picker/DatetimePicker.es6.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class DatetimePicker extends React.Component<Props, State> {
3838

3939
componentDidUpdate(prevProps: Props) {
4040
if(prevProps.value !== this.props.value) {
41-
this.setState({datetime: this.props.value});
41+
this.setState({datetime: this.props.value})
4242
}
4343
}
4444

components/form/dimension/DimensionInput.es6.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ class DimensionInput extends React.Component<Props, State> {
6969
) : (
7070
<div className="ds-form-input-dimension__select">
7171
<Select
72-
placeholder={selectedUnit || "Please select a unit"}
72+
placeholder={selectedUnit || 'Please select a unit'}
7373
onChange={this.onUnitChange}
7474
search={false}
7575
>

components/form/file-upload/FileUpload.es6.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class FileUpload extends React.Component<Props> {
101101
})}
102102
multiple={multiple}
103103
accept={accept}
104-
onClick={(e) => { e.preventDefault(); } }
104+
onClick={(e) => { e.preventDefault() } }
105105
onDrop={this.onDrop}>
106106
{children || uploadContent}
107107

@@ -120,7 +120,7 @@ class FileUpload extends React.Component<Props> {
120120
small={buttonSmall}
121121
loading={loading}
122122
// $FlowFixMe: Not sure how to type this.dropzoneRef
123-
onClick={(e) => { e.preventDefault(); this.dropzoneRef.open(); } }
123+
onClick={(e) => { e.preventDefault(); this.dropzoneRef.open() } }
124124
/>}
125125
{!hideUploadedFileLinks && (fileDivs)}
126126
</div>

0 commit comments

Comments
 (0)