mirror of
https://github.com/status-im/react-native.git
synced 2025-01-09 17:15:54 +00:00
90c7ad112f
Summary: add Clipboard component for ios and android ```javascript import Clipboard from 'react-native' Clipboard.get((content)=>{ console.log('here is content in clipboard:%s',content) }); var content = 'here is a string'; Clipboard.set(content); ``` Closes https://github.com/facebook/react-native/pull/4384 Reviewed By: svcscm Differential Revision: D2738881 Pulled By: mkonicek fb-gh-sync-id: a06df32d1eb2824cc9ca3de9d45e4e67fd2edbc9
63 lines
1.3 KiB
JavaScript
63 lines
1.3 KiB
JavaScript
/**
|
|
* Copyright 2004-present Facebook. All Rights Reserved.
|
|
*/
|
|
'use strict';
|
|
|
|
var NativeModules = {
|
|
I18n: {
|
|
translationsDictionary: JSON.stringify({
|
|
'Good bye, {name}!|Bye message': '¡Adiós {name}!',
|
|
}),
|
|
},
|
|
Timing: {
|
|
createTimer: jest.genMockFunction(),
|
|
deleteTimer: jest.genMockFunction(),
|
|
},
|
|
GraphPhotoUpload: {
|
|
upload: jest.genMockFunction(),
|
|
},
|
|
FacebookSDK: {
|
|
login: jest.genMockFunction(),
|
|
logout: jest.genMockFunction(),
|
|
queryGraphPath: jest.genMockFunction().mockImpl(
|
|
(path, method, params, callback) => callback()
|
|
),
|
|
},
|
|
DataManager: {
|
|
queryData: jest.genMockFunction(),
|
|
},
|
|
UIManager: {
|
|
customBubblingEventTypes: {},
|
|
customDirectEventTypes: {},
|
|
Dimensions: {},
|
|
RCTModalFullscreenView: {
|
|
Constants: {},
|
|
},
|
|
RCTScrollView: {
|
|
Constants: {},
|
|
},
|
|
},
|
|
AsyncLocalStorage: {
|
|
getItem: jest.genMockFunction(),
|
|
setItem: jest.genMockFunction(),
|
|
removeItem: jest.genMockFunction(),
|
|
clear: jest.genMockFunction(),
|
|
},
|
|
SourceCode: {
|
|
scriptURL: null,
|
|
},
|
|
BuildInfo: {
|
|
appVersion: '0',
|
|
buildVersion: '0',
|
|
},
|
|
ModalFullscreenViewManager: {},
|
|
AlertManager: {
|
|
alertWithArgs: jest.genMockFunction(),
|
|
},
|
|
Clipboard: {
|
|
setString: jest.genMockFunction(),
|
|
},
|
|
};
|
|
|
|
module.exports = NativeModules;
|