You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
📝 Add docstrings to handle-error-case-for-init-data
Docstrings generation was requested by @reneshen0328.
* #4350 (comment)
The following files were modified:
* `src/elements/content-sharing/ContentSharing.js`
* `src/elements/content-sharing/ContentSharingV2.tsx`
* Top-level React component that initializes the sharing API and renders the content-sharing UI,
78
+
* either the feature-flagged ContentSharingV2 wrapped with localization and providers or the legacy SharingModal with an optional custom launch button.
79
+
*
80
+
* @param {string} [apiHost] - Hostname for the API; defaults to the library's default API hostname.
81
+
* @param {React.ReactNode} [children] - Optional children passed into the ContentSharingV2 variant.
82
+
* @param {Object} [config] - Configuration object passed to the legacy SharingModal.
83
+
* @param {React.ReactElement} [customButton] - Optional custom launch button; when provided it is cloned and wired to open the sharing UI.
84
+
* @param {boolean} [displayInModal] - When true, instructs the legacy sharing UI to render inside a modal.
85
+
* @param {Object} [features] - Feature-flag map; used to enable the `contentSharingV2` variant.
86
+
* @param {boolean} [hasProviders] - When true, wraps ContentSharingV2 with provider context; controls whether Providers is applied.
87
+
* @param {string} itemID - Identifier of the item being shared.
88
+
* @param {string} itemType - Type of the item being shared.
89
+
* @param {string} [language] - Locale code used by the Internationalize wrapper.
90
+
* @param {Object} [messages] - Localization messages passed to Internationalize.
91
+
* @param {string} [token] - Authorization token used to construct the API client.
92
+
* @param {string} [uuid] - Unique identifier used to reset component visibility when it changes.
93
+
* @returns {JSX.Element|null} The rendered content-sharing UI (either ContentSharingV2 wrapped with Internationalize and Providers, or the legacy SharingModal and optional launch button), or null while the API is unavailable.
0 commit comments