Skip to content

Commit

Permalink
Convert InputAccessoryView to ESM (#42887)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #42887

As per title.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D53355779

fbshipit-source-id: 2e4aa8e0dec83c7e2700eb8df76efa122c4adea8
  • Loading branch information
fabriziocucci authored and facebook-github-bot committed Feb 7, 2024
1 parent 009542f commit bd6a199
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,4 @@ const styles = StyleSheet.create({
},
});

module.exports = InputAccessoryView;
export default InputAccessoryView;
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

const render = require('../../../../jest/renderer');
const View = require('../../View/View');
const InputAccessoryView = require('../InputAccessoryView');
const InputAccessoryView = require('../InputAccessoryView').default;
const React = require('react');

describe('<InputAccessoryView />', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2413,7 +2413,7 @@ exports[`public API should not change unintentionally Libraries/Components/TextI
backgroundColor?: ?ColorValue,
|}>;
declare const InputAccessoryView: React.AbstractComponent<Props>;
declare module.exports: InputAccessoryView;
declare export default typeof InputAccessoryView;
"
`;

Expand Down
3 changes: 2 additions & 1 deletion packages/react-native/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ module.exports = {
return require('./Libraries/Image/ImageBackground');
},
get InputAccessoryView(): InputAccessoryView {
return require('./Libraries/Components/TextInput/InputAccessoryView');
return require('./Libraries/Components/TextInput/InputAccessoryView')
.default;
},
get KeyboardAvoidingView(): KeyboardAvoidingView {
return require('./Libraries/Components/Keyboard/KeyboardAvoidingView')
Expand Down

0 comments on commit bd6a199

Please sign in to comment.