diff --git a/Libraries/Share/Share.js b/Libraries/Share/Share.js index c34e72ff8..457cf4a96 100644 --- a/Libraries/Share/Share.js +++ b/Libraries/Share/Share.js @@ -22,7 +22,12 @@ const { } = require('NativeModules'); type Content = { title?: string, message: string } | { title?: string, url: string }; -type Options = { dialogTitle?: string, excludedActivityTypes?: Array, tintColor?: string }; +type Options = { + dialogTitle?: string, + excludedActivityTypes?: Array, + tintColor?: string, + subject?: string +}; class Share { @@ -50,12 +55,13 @@ class Share { * * #### iOS * - * - `excludedActivityTypes` - * - `tintColor` + * - `subject` - a subject to share via email + * - `excludedActivityTypes` + * - `tintColor` * * #### Android * - * - `dialogTitle` + * - `dialogTitle` * */ static share(content: Content, options: Options = {}): Promise { diff --git a/RNTester/js/ShareExample.js b/RNTester/js/ShareExample.js index 79f1d0478..9b4d05342 100644 --- a/RNTester/js/ShareExample.js +++ b/RNTester/js/ShareExample.js @@ -82,6 +82,7 @@ class ShareMessageExample extends React.Component<$FlowFixMeProps, any> { url: 'http://facebook.github.io/react-native/', title: 'React Native' }, { + subject: 'A subject to go in the email heading', dialogTitle: 'Share React Native website', excludedActivityTypes: [ 'com.apple.UIKit.activity.PostToTwitter'