File tree 1 file changed +8
-3
lines changed
1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,8 @@ const MobileTabControl = ({ children }) => {
9
9
const [ currentTab , setCurrentTab ] = useTabs ( ) ;
10
10
11
11
// 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 */
13
14
return (
14
15
< select
15
16
onChange = { ( e ) => setCurrentTab ( e . target . value ) }
@@ -35,16 +36,20 @@ const MobileTabControl = ({ children }) => {
35
36
</ option >
36
37
) ) }
37
38
</ select >
39
+ /* eslint-enable react/prop-types, jsx-a11y/no-onchange */
38
40
) ;
39
- /* eslint-enable */
41
+ } ;
42
+
43
+ MobileTabControl . propTypes = {
44
+ children : PropTypes . node . isRequired ,
40
45
} ;
41
46
42
47
const Bar = ( { children } ) => {
43
48
const detectMobile = useMobileDetect ( ) ;
44
49
const isMobile = detectMobile . isMobile ( ) ;
45
50
46
51
if ( isMobile ) {
47
- return < MobileTabControl children = { children } / >;
52
+ return < MobileTabControl > { children } </ MobileTabControl > ;
48
53
}
49
54
50
55
return (
You can’t perform that action at this time.
0 commit comments