Skip to content

Commit e0a67e0

Browse files
authored
fix: Fix modernization hook for ContentSharing v2 (#4339)
* fix: Fix modernization hook for ContentPickerV2 * fix: Align modernization story names
1 parent b39a482 commit e0a67e0

File tree

7 files changed

+10
-7
lines changed

7 files changed

+10
-7
lines changed

src/elements/content-explorer/stories/tests/ContentExplorer-visual.stories.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export const basic = {
2828
},
2929
};
3030

31-
export const Modernization = {
31+
export const withModernization = {
3232
args: {
3333
enableModernizedComponents: true,
3434
},

src/elements/content-picker/stories/tests/ContentPicker-visual.stories.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { DEFAULT_HOSTNAME_API } from '../../../../constants';
88

99
export const basic = {};
1010

11-
export const Modernization = {
11+
export const withModernization = {
1212
args: {
1313
enableModernizedComponents: true,
1414
},

src/elements/content-preview/stories/tests/ContentPreview-visual.stories.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export const basic = {
3030
},
3131
};
3232

33-
export const Modernization = {
33+
export const withModernization = {
3434
args: {
3535
enableModernizedComponents: true,
3636
},

src/elements/content-sharing/ContentSharingV2.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import type { CollaborationRole, Collaborator, Item, SharedLink, User } from '@b
77
import API from '../../api';
88
import Internationalize from '../common/Internationalize';
99
import Providers from '../common/Providers';
10+
import { withBlueprintModernization } from '../common/withBlueprintModernization';
1011
import { fetchAvatars, fetchCollaborators, fetchCurrentUser, fetchItem } from './apis';
1112
import { useSharingService } from './hooks/useSharingService';
1213
import { convertCollabsResponse, convertItemResponse } from './utils';
@@ -177,4 +178,4 @@ function ContentSharingV2({
177178
);
178179
}
179180

180-
export default ContentSharingV2;
181+
export default withBlueprintModernization(ContentSharingV2);

src/elements/content-sharing/stories/tests/ContentSharingV2-visual.stories.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import * as React from 'react';
22
import { expect, screen, userEvent, waitFor, within } from 'storybook/test';
33

4+
import { Button } from '@box/blueprint-web';
5+
46
import { TYPE_FILE } from '../../../../constants';
57
import {
68
mockAPIWithCollaborators,
@@ -69,7 +71,7 @@ export default {
6971
title: 'Elements/ContentSharingV2/tests/visual-regression-tests',
7072
component: ContentSharingV2,
7173
args: {
72-
children: <button>Open Unified Share Modal</button>,
74+
children: <Button>Open Unified Share Modal</Button>,
7375
itemType: TYPE_FILE,
7476
itemID: global.FILE_ID,
7577
},

src/elements/content-sidebar/stories/tests/ContentSidebar-visual.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export default {
2323
},
2424
};
2525

26-
export const Modernization = {
26+
export const withModernization = {
2727
args: {
2828
enableModernizedComponents: true,
2929
},

src/elements/content-uploader/stories/tests/ContentUploader-visual.stories.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export const basic = {
2323
},
2424
};
2525

26-
export const Modernization = {
26+
export const withModernization = {
2727
args: {
2828
enableModernizedComponents: true,
2929
},

0 commit comments

Comments
 (0)