Skip to content

Commit

Permalink
fix: warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
zouxuoz committed Nov 21, 2019
1 parent 971f665 commit b9d8f0b
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 9 deletions.
1 change: 1 addition & 0 deletions src/common/Tag/Tag.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ const HTML_TAGS = [
'nav',
'img',
'pre',
'textarea',
];

const collectProps = (props) => pickBy(props, (value, name) => COLLECTED_PROPS.indexOf(name) !== -1 || /^data-/.test(name));
Expand Down
2 changes: 1 addition & 1 deletion src/components/Avatars/Avatars.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type AvatarsProps = {
};

const tooltipClassName = css`
&:not(:first-child) {
&:not(:first-of-type) {
margin-left: -10px;
}
`;
Expand Down
2 changes: 1 addition & 1 deletion src/components/ButtonGroup/ButtonGroup.theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const [ButtonGroupTag, theme] = createThemeTag(name, {
borderTopRightRadius: 0,
borderBottomRightRadius: 0,
},
'&:not(:first-child)': {
'&:not(:first-of-type)': {
borderLeftColor: 'none',
borderTopLeftRadius: 0,
borderBottomLeftRadius: 0,
Expand Down
2 changes: 1 addition & 1 deletion src/components/Logs/Logs.theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const [LogMessageTag, themeLogMessage] = createThemeTag(`${name}Wrapper`, ({ COL
padding: '0 24px',
cursor: 'default',

'&:first-child': {
'&:first-of-type': {
paddingTop: '24px',
},

Expand Down
4 changes: 2 additions & 2 deletions src/components/Radio/Radio.theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ const [RadioButtonTag, themeRadioButton] = createThemeTag(`${name}Button`, {
root: {
flex: 1,

'&:first-child > *': {
'&:first-of-type > *': {
borderRightStyle: 'unset',
borderTopRightRadius: 0,
borderBottomRightRadius: 0,
Expand All @@ -101,7 +101,7 @@ const [RadioButtonTag, themeRadioButton] = createThemeTag(`${name}Button`, {
borderBottomLeftRadius: 0,
},

'&:not(:first-child):not(:last-child) > *': {
'&:not(:first-of-type):not(:last-child) > *': {
borderRadius: 0,
},
},
Expand Down
2 changes: 1 addition & 1 deletion src/components/Table/TableBody.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const [TableBodyTag, themeBody] = createThemeTag(name, ({ COLORS }: *): * => ({

modifiers: {
bordered: {
'&:first-child': {
'&:first-of-type': {
borderTop: `1px solid ${COLORS.SECONDARY_BORDER_COLOR}`,
},
},
Expand Down
2 changes: 1 addition & 1 deletion src/components/Table/TableHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const [TableHeaderTag, theme] = createThemeTag(name, ({ COLORS, FONTS }: *) => (
},

bordered: {
'&:first-child': {
'&:first-of-type': {
borderTop: `1px solid ${COLORS.SECONDARY_BORDER_COLOR}`,
},
},
Expand Down
4 changes: 2 additions & 2 deletions src/components/TextArea/TextArea.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ class TextArea extends React.Component<TextAreaProps> {
}

render() {
const { onChange, ...rest } = this.props;
const { onChange, hasError, ...rest } = this.props;

return <TextAreaTag { ...rest } onChange={ this.onChange }tagName="textarea" />;
return <TextAreaTag { ...rest } onChange={ this.onChange } tagName="textarea" />;
}
}

Expand Down

0 comments on commit b9d8f0b

Please sign in to comment.