Skip to content

Commit

Permalink
(InputAccessoryView) separate ios and android files
Browse files Browse the repository at this point in the history
  • Loading branch information
hduprat committed Jun 21, 2022
1 parent 91d6c7d commit 75523a7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
4 changes: 4 additions & 0 deletions Libraries/Components/TextInput/InputAccessoryView.android.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
'use strict';

module.exports = require('../UnimplementedViews/UnimplementedView');

Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,12 @@
*/

import * as React from 'react';
import Platform from '../../Utilities/Platform';
import StyleSheet, {
type ViewStyleProp,
type ColorValue,
} from '../../StyleSheet/StyleSheet';

import RCTInputAccessoryViewNativeComponent from './RCTInputAccessoryViewNativeComponent';
import UnimplementedView from '../UnimplementedViews/UnimplementedView';

/**
* Note: iOS only
Expand Down Expand Up @@ -89,15 +87,6 @@ type Props = $ReadOnly<{|

class InputAccessoryView extends React.Component<Props> {
render(): React.Node {
if (Platform.OS !== 'ios') {
console.warn('<InputAccessoryView> is only supported on iOS.');
return (
<UnimplementedView style={this.props.style}>
{this.props.children}
</UnimplementedView>
);
}

if (React.Children.count(this.props.children) === 0) {
return null;
}
Expand Down

0 comments on commit 75523a7

Please sign in to comment.