From f114d806746d89ced23af872b9fa97413ed155a1 Mon Sep 17 00:00:00 2001 From: McCoy Zhu Date: Mon, 17 Oct 2022 15:54:34 -0400 Subject: [PATCH] feat(ios): `Share` with `anchor` --- Libraries/ActionSheetIOS/ActionSheetIOS.d.ts | 1 + Libraries/Share/Share.d.ts | 1 + Libraries/Share/Share.js | 3 +++ 3 files changed, 5 insertions(+) diff --git a/Libraries/ActionSheetIOS/ActionSheetIOS.d.ts b/Libraries/ActionSheetIOS/ActionSheetIOS.d.ts index 5aad60b1c1a8..89bdd3732399 100644 --- a/Libraries/ActionSheetIOS/ActionSheetIOS.d.ts +++ b/Libraries/ActionSheetIOS/ActionSheetIOS.d.ts @@ -30,6 +30,7 @@ export interface ShareActionSheetIOSOptions { message?: string | undefined; url?: string | undefined; subject?: string | undefined; + anchor?: number | undefined; /** The activities to exclude from the ActionSheet. * For example: ['com.apple.UIKit.activity.PostToTwitter'] */ diff --git a/Libraries/Share/Share.d.ts b/Libraries/Share/Share.d.ts index 24bc7cacd1a0..76ac757c97e8 100644 --- a/Libraries/Share/Share.d.ts +++ b/Libraries/Share/Share.d.ts @@ -24,6 +24,7 @@ export type ShareOptions = { excludedActivityTypes?: Array | undefined; tintColor?: ColorValue | undefined; subject?: string | undefined; + anchor?: number | undefined; }; export type ShareSharedAction = { diff --git a/Libraries/Share/Share.js b/Libraries/Share/Share.js index 4f6231dcac75..10fff7443e03 100644 --- a/Libraries/Share/Share.js +++ b/Libraries/Share/Share.js @@ -31,6 +31,7 @@ type Options = { excludedActivityTypes?: Array, tintColor?: string, subject?: string, + anchor?: number, ... }; @@ -131,6 +132,8 @@ class Share { url: typeof content.url === 'string' ? content.url : undefined, subject: options.subject, tintColor: typeof tintColor === 'number' ? tintColor : undefined, + anchor: + typeof options.anchor === 'number' ? options.anchor : undefined, excludedActivityTypes: options.excludedActivityTypes, }, error => reject(error),