Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/elements/content-sharing/ContentSharing.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { withBlueprintModernization } from '../common/withBlueprintModernization
import ContentSharingV2 from './ContentSharingV2';
import SharingModal from './SharingModal';

import type { ElementsXhrError } from '../../common/types/api';
import type { FeatureConfig } from '../common/feature-checking';
import type { ItemType, StringMap } from '../../common/types/core';
import type { USMConfig } from '../../features/unified-share-modal/flowTypes';
Expand Down Expand Up @@ -62,6 +63,10 @@ type ContentSharingProps = {
language: string,
/** messages - Localized strings used by the element */
messages?: StringMap,
/** onClose - Callback when the modal is closed by user action */
onClose?: () => void,
/** onError - Callback when item data fails to load, preventing USM from opening */
onError?: (error: ElementsXhrError) => void,
/** token - Valid access token */
token: string,
/** uuid - Unique identifier, used for refreshing element visibility when called from the ES6 wrapper */
Expand Down Expand Up @@ -91,6 +96,8 @@ function ContentSharing({
itemType,
language,
messages,
onClose,
onError,
token,
uuid,
variant,
Expand Down Expand Up @@ -133,6 +140,8 @@ function ContentSharing({
config={config}
itemId={itemID}
itemType={itemType}
onClose={onClose}
onError={onError}
variant={variant}
>
{children}
Expand Down Expand Up @@ -164,5 +173,4 @@ function ContentSharing({
);
}

export { ContentSharing as ContentSharingComponent };
export default withBlueprintModernization(ContentSharing);
1 change: 1 addition & 0 deletions src/elements/wrappers/ContentSharing.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class ContentSharing extends ES6Wrapper {
}
this.root.render(
<ContentSharingReactComponent
enableModernizedComponents={true}
itemID={this.id}
itemType={itemType || ITEM_TYPE_FILE}
language={this.language}
Expand Down
Loading