Skip to content

Commit 92e1ad1

Browse files
chore: resolve eslint issues
1 parent bffcc83 commit 92e1ad1

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/components/Tabs/Bar.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ const MobileTabControl = ({ children }) => {
99
const [currentTab, setCurrentTab] = useTabs();
1010

1111
// eslint gets angry about using props from React.Children.map
12-
/* eslint-disable */
12+
// eslint also suggests using onBlur vs onChange, but i think we want the immediate change.
13+
/* eslint-disable react/prop-types, jsx-a11y/no-onchange */
1314
return (
1415
<select
1516
onChange={(e) => setCurrentTab(e.target.value)}
@@ -35,16 +36,20 @@ const MobileTabControl = ({ children }) => {
3536
</option>
3637
))}
3738
</select>
39+
/* eslint-enable react/prop-types, jsx-a11y/no-onchange */
3840
);
39-
/* eslint-enable */
41+
};
42+
43+
MobileTabControl.propTypes = {
44+
children: PropTypes.node.isRequired,
4045
};
4146

4247
const Bar = ({ children }) => {
4348
const detectMobile = useMobileDetect();
4449
const isMobile = detectMobile.isMobile();
4550

4651
if (isMobile) {
47-
return <MobileTabControl children={children} />;
52+
return <MobileTabControl>{children}</MobileTabControl>;
4853
}
4954

5055
return (

0 commit comments

Comments
 (0)