Skip to content

Commit 36553f7

Browse files
committed
Remove classnames dependency and fix List component
1 parent bfbac52 commit 36553f7

File tree

4 files changed

+12
-13
lines changed

4 files changed

+12
-13
lines changed

.eslintrc.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@ module.exports = {
1414
"some": [ "nesting", "id" ]
1515
}
1616
}],
17-
"jsx-a11y/label-has-for": [ "error", {
18-
"required": {
19-
"some": [ "nesting", "id" ]
20-
}
21-
}]
17+
"jsx-a11y/label-has-associated-control": ["error", { assert: "either" } ],
18+
"jsx-a11y/label-has-for": 'off'
2219
}
2320
}

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@
5959
"babel-eslint": "^10.0.2",
6060
"babel-loader": "^8.0.5",
6161
"babel-plugin-styled-components": "^1.10.0",
62-
"classnames": "^2.2.6",
6362
"cross-env": "^5.2.0",
6463
"eslint": "^5.16.0",
6564
"eslint-config-airbnb": "^17.1.1",

src/components/FileIcon/FileIcon.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/* FileIcon will be rewritten soon */
2+
/* eslint-disable */
3+
14
import React from 'react';
25
import propTypes from 'prop-types';
36
import cx from 'classnames';

src/components/List/List.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ import propTypes from 'prop-types';
44
import styled from 'styled-components';
55
import { createBorderStyles, createBoxStyles } from '../common';
66

7-
const createListPositionStyles = ({ verticalAlign, horizontalAlign }) => `
7+
const createListPositionStyles = ({
8+
verticalAlign = 'bottom',
9+
horizontalAlign = 'left',
10+
}) => `
811
position: absolute;
912
${verticalAlign === 'bottom' ? 'bottom: 0;' : 'top: 0;'}
1013
${horizontalAlign === 'left' ? 'left: 0;' : 'right: 0;'}
@@ -63,16 +66,13 @@ List.defaultProps = {
6366
inline: false,
6467
className: '',
6568
children: null,
66-
verticalAlign: 'bottom',
67-
horizontalAlign: 'left',
69+
verticalAlign: undefined,
70+
horizontalAlign: undefined,
6871
};
6972

7073
List.propTypes = {
7174
className: propTypes.string,
72-
style: propTypes.shape([
73-
propTypes.string,
74-
propTypes.number,
75-
]),
75+
style: propTypes.shape([propTypes.string, propTypes.number]),
7676
fullWidth: propTypes.bool,
7777
inline: propTypes.bool,
7878
shadow: propTypes.bool,

0 commit comments

Comments
 (0)