From b9d8f0bcd9bfa0afb056ca1f485cc3f3d8b27842 Mon Sep 17 00:00:00 2001 From: Osipov Vladimir Date: Thu, 21 Nov 2019 14:40:17 +0300 Subject: [PATCH] fix: warnings --- src/common/Tag/Tag.js | 1 + src/components/Avatars/Avatars.js | 2 +- src/components/ButtonGroup/ButtonGroup.theme.js | 2 +- src/components/Logs/Logs.theme.js | 2 +- src/components/Radio/Radio.theme.js | 4 ++-- src/components/Table/TableBody.js | 2 +- src/components/Table/TableHeader.js | 2 +- src/components/TextArea/TextArea.js | 4 ++-- 8 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/common/Tag/Tag.js b/src/common/Tag/Tag.js index 104820d0..3cf5ffdb 100644 --- a/src/common/Tag/Tag.js +++ b/src/common/Tag/Tag.js @@ -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)); diff --git a/src/components/Avatars/Avatars.js b/src/components/Avatars/Avatars.js index e28b9940..163dd627 100644 --- a/src/components/Avatars/Avatars.js +++ b/src/components/Avatars/Avatars.js @@ -20,7 +20,7 @@ type AvatarsProps = { }; const tooltipClassName = css` - &:not(:first-child) { + &:not(:first-of-type) { margin-left: -10px; } `; diff --git a/src/components/ButtonGroup/ButtonGroup.theme.js b/src/components/ButtonGroup/ButtonGroup.theme.js index 192330ec..c8b65dc2 100644 --- a/src/components/ButtonGroup/ButtonGroup.theme.js +++ b/src/components/ButtonGroup/ButtonGroup.theme.js @@ -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, diff --git a/src/components/Logs/Logs.theme.js b/src/components/Logs/Logs.theme.js index dd7ca38d..a015f53d 100644 --- a/src/components/Logs/Logs.theme.js +++ b/src/components/Logs/Logs.theme.js @@ -26,7 +26,7 @@ const [LogMessageTag, themeLogMessage] = createThemeTag(`${name}Wrapper`, ({ COL padding: '0 24px', cursor: 'default', - '&:first-child': { + '&:first-of-type': { paddingTop: '24px', }, diff --git a/src/components/Radio/Radio.theme.js b/src/components/Radio/Radio.theme.js index 29084c40..83dac298 100644 --- a/src/components/Radio/Radio.theme.js +++ b/src/components/Radio/Radio.theme.js @@ -89,7 +89,7 @@ const [RadioButtonTag, themeRadioButton] = createThemeTag(`${name}Button`, { root: { flex: 1, - '&:first-child > *': { + '&:first-of-type > *': { borderRightStyle: 'unset', borderTopRightRadius: 0, borderBottomRightRadius: 0, @@ -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, }, }, diff --git a/src/components/Table/TableBody.js b/src/components/Table/TableBody.js index ac706271..98de0165 100644 --- a/src/components/Table/TableBody.js +++ b/src/components/Table/TableBody.js @@ -35,7 +35,7 @@ const [TableBodyTag, themeBody] = createThemeTag(name, ({ COLORS }: *): * => ({ modifiers: { bordered: { - '&:first-child': { + '&:first-of-type': { borderTop: `1px solid ${COLORS.SECONDARY_BORDER_COLOR}`, }, }, diff --git a/src/components/Table/TableHeader.js b/src/components/Table/TableHeader.js index 1625c2df..3e54cc70 100644 --- a/src/components/Table/TableHeader.js +++ b/src/components/Table/TableHeader.js @@ -30,7 +30,7 @@ const [TableHeaderTag, theme] = createThemeTag(name, ({ COLORS, FONTS }: *) => ( }, bordered: { - '&:first-child': { + '&:first-of-type': { borderTop: `1px solid ${COLORS.SECONDARY_BORDER_COLOR}`, }, }, diff --git a/src/components/TextArea/TextArea.js b/src/components/TextArea/TextArea.js index 7bee3e4b..9fdaa17d 100644 --- a/src/components/TextArea/TextArea.js +++ b/src/components/TextArea/TextArea.js @@ -24,9 +24,9 @@ class TextArea extends React.Component { } render() { - const { onChange, ...rest } = this.props; + const { onChange, hasError, ...rest } = this.props; - return ; + return ; } }