mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-21 09:38:01 +02:00
20 lines
423 B
TypeScript
20 lines
423 B
TypeScript
|
const { NativeModules, Platform } = require('react-native');
|
||
|
|
||
|
export interface SharedData {
|
||
|
title?: string,
|
||
|
text?: string,
|
||
|
resources?: string[]
|
||
|
}
|
||
|
|
||
|
const ShareExtension = (Platform.OS === 'android' && NativeModules.ShareExtension) ?
|
||
|
{
|
||
|
data: () => NativeModules.ShareExtension.data(),
|
||
|
close: () => NativeModules.ShareExtension.close(),
|
||
|
} :
|
||
|
{
|
||
|
data: () => {},
|
||
|
close: () => {},
|
||
|
};
|
||
|
|
||
|
export default ShareExtension;
|