Skip to content

Commit 8032a4b

Browse files
chore: updating dsrn to use named exports instead of default exports (#650)
## **Description** This PR standardizes the export conventions across the design system by converting all default exports to named exports in the `design-system-react-native` package. The primary goals of this change are: 1. Align export patterns between design-system-react and design-system-react-native 2. Make component usage more consistent and predictable for developers 3. Adopt best practices for module exports in TypeScript Key changes include: - Converting component exports from default to named exports - Updating all import statements to use named imports - Standardizing barrel exports in index.ts files - Ensuring the root index.ts re-exports everything from components/index.ts Allows us to do: ```jsx import { AvatarToken, AvatarTokenSize, BadgeNetwork, ButtonSize, ButtonIcon, ButtonIconSize, IconName, Text, TextVariant, TextColor, AvatarAccount, AvatarAccountVariant, Icon, } from '@metamask/design-system-react-native'; ``` ## **Related issues** Fixes: #649 ## **Manual testing steps** 1. Build the React Native package: `yarn workspace @metamask/design-system-react-native build` 2. Verify that the build completes successfully 3. Run tests: `yarn workspace @metamask/design-system-react-native test` 4. Run storybook to check components render as necessary (storybook will error out on incorrect imports) ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** ```tsx // Before - default export in component const Component = () => { ... }; export default Component; // Before - imports using default import import Component from './Component'; ``` ### **After** ```tsx // After - named export in component export const Component = () => { ... }; // After - imports using named import import { Component } from './Component'; ``` Manual storybook smoke test https://github.com/user-attachments/assets/27a4d42e-cc14-4442-9830-b9b703d0c819 ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) - [x] I've completed the PR template to the best of my ability - [x] I've included tests if applicable - [x] I've documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I've applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.
1 parent a5b394f commit 8032a4b

File tree

114 files changed

+260
-333
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+260
-333
lines changed

packages/design-system-react-native/src/components/AvatarAccount/AvatarAccount.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react-native';
22
import { View } from 'react-native';
33

44
import { AvatarAccountSize, AvatarAccountVariant } from '../../types';
5-
import AvatarAccount from './AvatarAccount';
5+
import { AvatarAccount } from './AvatarAccount';
66
import { SAMPLE_AVATARACCOUNT_ADDRESSES } from './AvatarAccount.constants';
77
import type { AvatarAccountProps } from './AvatarAccount.types';
88

packages/design-system-react-native/src/components/AvatarAccount/AvatarAccount.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { render } from '@testing-library/react-native';
22
import React from 'react';
33

44
import { AvatarAccountSize, AvatarAccountVariant } from '../../types';
5-
import AvatarAccount from './AvatarAccount';
5+
import { AvatarAccount } from './AvatarAccount';
66
import { SAMPLE_AVATARACCOUNT_ADDRESSES } from './AvatarAccount.constants';
77

88
jest.mock('react-native-svg', () => {

packages/design-system-react-native/src/components/AvatarAccount/AvatarAccount.tsx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ import {
66
AvatarBaseShape,
77
AvatarAccountVariant,
88
} from '../../types';
9-
import AvatarBase from '../AvatarBase';
10-
import Blockies from '../temp-components/Blockies';
11-
import Jazzicon from '../temp-components/Jazzicon';
12-
import Maskicon from '../temp-components/Maskicon';
9+
import { AvatarBase } from '../AvatarBase';
10+
import { Blockies } from '../temp-components/Blockies';
11+
import { Jazzicon } from '../temp-components/Jazzicon';
12+
import { Maskicon } from '../temp-components/Maskicon';
1313
import type { AvatarAccountProps } from './AvatarAccount.types';
1414

15-
const AvatarAccount = ({
15+
export const AvatarAccount = ({
1616
address,
1717
variant = AvatarAccountVariant.Jazzicon,
1818
size = AvatarAccountSize.Md,
@@ -53,5 +53,3 @@ const AvatarAccount = ({
5353
</AvatarBase>
5454
);
5555
};
56-
57-
export default AvatarAccount;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export { AvatarAccountSize, AvatarAccountVariant } from '../../types';
2-
export { default } from './AvatarAccount';
2+
export { AvatarAccount } from './AvatarAccount';
33
export type { AvatarAccountProps } from './AvatarAccount.types';

packages/design-system-react-native/src/components/AvatarBase/AvatarBase.stories.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import type { Meta, StoryObj } from '@storybook/react-native';
22
import { View } from 'react-native';
33

44
import { AvatarBaseSize, AvatarBaseShape } from '../../types';
5-
import ImageOrSvg from '../temp-components/ImageOrSvg';
6-
import Icon, { IconName } from '../Icon';
7-
import AvatarBase from './AvatarBase';
5+
import { ImageOrSvg } from '../temp-components/ImageOrSvg';
6+
import { Icon, IconName } from '../Icon';
7+
import { AvatarBase } from './AvatarBase';
88
import { SAMPLE_AVATARBASE_URIS } from './AvatarBase.dev';
99
import type { AvatarBaseProps } from './AvatarBase.types';
1010

packages/design-system-react-native/src/components/AvatarBase/AvatarBase.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import { render } from '@testing-library/react-native';
44
import React from 'react';
55

66
import { AvatarBaseSize, AvatarBaseShape } from '../../types';
7-
import Text, { TextColor, TextVariant } from '../Text';
8-
import AvatarBase from './AvatarBase';
7+
import { Text, TextColor, TextVariant } from '../Text';
8+
import { AvatarBase } from './AvatarBase';
99
import {
1010
TWCLASSMAP_AVATARBASE_SIZE_DIMENSION,
1111
TWCLASSMAP_AVATARBASE_HASBORDER_SIZE_DIMENSION,

packages/design-system-react-native/src/components/AvatarBase/AvatarBase.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import React from 'react';
44
import { View } from 'react-native';
55

66
import { AvatarBaseSize, AvatarBaseShape } from '../../types';
7-
import Text, { TextColor, TextVariant, FontWeight } from '../Text';
7+
import { Text, TextColor, TextVariant, FontWeight } from '../Text';
88
import {
99
TWCLASSMAP_AVATARBASE_SIZE_DIMENSION,
1010
TWCLASSMAP_AVATARBASE_HASBORDER_SIZE_DIMENSION,
@@ -13,7 +13,7 @@ import {
1313
} from './AvatarBase.constants';
1414
import type { AvatarBaseProps } from './AvatarBase.types';
1515

16-
const AvatarBase = ({
16+
export const AvatarBase = ({
1717
children,
1818
size = AvatarBaseSize.Md,
1919
shape = AvatarBaseShape.Circle,
@@ -55,5 +55,3 @@ const AvatarBase = ({
5555
</View>
5656
);
5757
};
58-
59-
export default AvatarBase;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export { AvatarBaseSize, AvatarBaseShape } from '../../types';
2-
export { default } from './AvatarBase';
2+
export { AvatarBase } from './AvatarBase';
33
export type { AvatarBaseProps } from './AvatarBase.types';

packages/design-system-react-native/src/components/AvatarFavicon/AvatarFavicon.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react-native';
22
import { View } from 'react-native';
33

44
import { AvatarFaviconSize } from '../../types';
5-
import AvatarFavicon from './AvatarFavicon';
5+
import { AvatarFavicon } from './AvatarFavicon';
66
import { SAMPLE_AVATARFAVICON_URIS } from './AvatarFavicon.dev';
77
import type { AvatarFaviconProps } from './AvatarFavicon.types';
88

packages/design-system-react-native/src/components/AvatarFavicon/AvatarFavicon.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { render, fireEvent } from '@testing-library/react-native';
22
import React from 'react';
33

4-
import AvatarFavicon from './AvatarFavicon';
4+
import { AvatarFavicon } from './AvatarFavicon';
55

66
const remoteImageSrc = { uri: 'https://example.com/photo.png' };
77
const remoteSvgSrc = { uri: 'https://example.com/logo.svg' };

packages/design-system-react-native/src/components/AvatarFavicon/AvatarFavicon.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ import React, { useState } from 'react';
33
import { ImageErrorEventData, NativeSyntheticEvent } from 'react-native';
44

55
import { AvatarFaviconSize, AvatarBaseShape } from '../../types';
6-
import AvatarBase from '../AvatarBase';
7-
import ImageOrSvg from '../temp-components/ImageOrSvg';
6+
import { AvatarBase } from '../AvatarBase';
7+
import { ImageOrSvg } from '../temp-components/ImageOrSvg';
88
import type { AvatarFaviconProps } from './AvatarFavicon.types';
99

10-
const AvatarFavicon = ({
10+
export const AvatarFavicon = ({
1111
src,
1212
size = AvatarFaviconSize.Md,
1313
name,
@@ -58,5 +58,3 @@ const AvatarFavicon = ({
5858
</AvatarBase>
5959
);
6060
};
61-
62-
export default AvatarFavicon;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export { AvatarFaviconSize } from '../../types';
2-
export { default } from './AvatarFavicon';
2+
export { AvatarFavicon } from './AvatarFavicon';
33
export type { AvatarFaviconProps } from './AvatarFavicon.types';

packages/design-system-react-native/src/components/AvatarGroup/AvatarGroup.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react-native';
22
import { ScrollView, View } from 'react-native';
33

44
import { AvatarGroupSize, AvatarGroupVariant } from '../../types';
5-
import AvatarGroup from './AvatarGroup';
5+
import { AvatarGroup } from './AvatarGroup';
66
import {
77
SAMPLE_AVATARGROUP_AVATARACCOUNTPROPSARR,
88
SAMPLE_AVATARGROUP_AVATARFAVICONPROPSARR,

packages/design-system-react-native/src/components/AvatarGroup/AvatarGroup.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { render } from '@testing-library/react-native';
22
import React from 'react';
33

44
import { AvatarGroupVariant, AvatarGroupSize } from '../../types';
5-
import AvatarGroup from './AvatarGroup';
5+
import { AvatarGroup } from './AvatarGroup';
66
import {
77
SAMPLE_AVATARGROUP_AVATARACCOUNTPROPSARR,
88
SAMPLE_AVATARGROUP_AVATARFAVICONPROPSARR,

packages/design-system-react-native/src/components/AvatarGroup/AvatarGroup.tsx

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@ import React, { useCallback } from 'react';
33
import { View } from 'react-native';
44

55
import { AvatarGroupSize, AvatarGroupVariant } from '../../types';
6-
import AvatarAccount, { AvatarAccountProps } from '../AvatarAccount';
7-
import AvatarBase, { AvatarBaseShape } from '../AvatarBase';
8-
import AvatarFavicon, { AvatarFaviconProps } from '../AvatarFavicon';
9-
import AvatarNetwork, { AvatarNetworkProps } from '../AvatarNetwork';
10-
import AvatarToken, { AvatarTokenProps } from '../AvatarToken';
11-
import Text, { TextColor } from '../Text';
6+
import { AvatarAccount, AvatarAccountProps } from '../AvatarAccount';
7+
import { AvatarBase, AvatarBaseShape } from '../AvatarBase';
8+
import { AvatarFavicon, AvatarFaviconProps } from '../AvatarFavicon';
9+
import { AvatarNetwork, AvatarNetworkProps } from '../AvatarNetwork';
10+
import { AvatarToken, AvatarTokenProps } from '../AvatarToken';
11+
import { Text, TextColor } from '../Text';
1212
import {
1313
MAP_AVATARGROUP_SIZE_OVERFLOWTEXT_TEXTVARIANT,
1414
TWCLASSMAP_AVATARGROUP_SIZE_SPACEBETWEENAVATARS,
1515
} from './AvatarGroup.constants';
1616
import { AvatarGroupProps } from './AvatarGroup.types';
1717

18-
const AvatarGroup = ({
18+
export const AvatarGroup = ({
1919
variant,
2020
avatarPropsArr,
2121
size = AvatarGroupSize.Md,
@@ -107,5 +107,3 @@ const AvatarGroup = ({
107107
</View>
108108
);
109109
};
110-
111-
export default AvatarGroup;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export { AvatarGroupSize, AvatarGroupVariant } from '../../types';
2-
export { default } from './AvatarGroup';
2+
export { AvatarGroup } from './AvatarGroup';
33
export type { AvatarGroupProps } from './AvatarGroup.types';

packages/design-system-react-native/src/components/AvatarIcon/AvatarIcon.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react-native';
22
import { View } from 'react-native';
33

44
import { AvatarIconSize, AvatarIconSeverity } from '../../types';
5-
import AvatarIcon from './AvatarIcon';
5+
import { AvatarIcon } from './AvatarIcon';
66
import type { AvatarIconProps } from './AvatarIcon.types';
77
import { IconName } from '../Icon';
88

packages/design-system-react-native/src/components/AvatarIcon/AvatarIcon.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import React from 'react';
55

66
import { AvatarIconSeverity, AvatarIconSize } from '../../types';
77
import { IconName } from '../Icon';
8-
import AvatarIcon from './AvatarIcon';
8+
import { AvatarIcon } from './AvatarIcon';
99
import {
1010
TWCLASSMAP_AVATARICON_SEVERITY_BACKGROUNDCOLOR,
1111
MAP_AVATARICON_SEVERITY_ICONCOLOR,

packages/design-system-react-native/src/components/AvatarIcon/AvatarIcon.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@ import {
77
AvatarBaseShape,
88
AvatarIconSeverity,
99
} from '../../types';
10-
import AvatarBase from '../AvatarBase';
11-
import Icon from '../Icon';
10+
import { AvatarBase } from '../AvatarBase';
11+
import { Icon } from '../Icon';
1212
import {
1313
MAP_AVATARICON_SIZE_ICONSIZE,
1414
MAP_AVATARICON_SEVERITY_ICONCOLOR,
1515
TWCLASSMAP_AVATARICON_SEVERITY_BACKGROUNDCOLOR,
1616
} from './AvatarIcon.constants';
1717
import type { AvatarIconProps } from './AvatarIcon.types';
1818

19-
const AvatarIcon = ({
19+
export const AvatarIcon = ({
2020
size = AvatarIconSize.Md,
2121
shape = AvatarBaseShape.Circle,
2222
severity = AvatarIconSeverity.Neutral,
@@ -49,5 +49,3 @@ const AvatarIcon = ({
4949
</AvatarBase>
5050
);
5151
};
52-
53-
export default AvatarIcon;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export { AvatarIconSize, AvatarIconSeverity } from '../../types';
2-
export { default } from './AvatarIcon';
2+
export { AvatarIcon } from './AvatarIcon';
33
export type { AvatarIconProps } from './AvatarIcon.types';

packages/design-system-react-native/src/components/AvatarNetwork/AvatarNetwork.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react-native';
22
import { View } from 'react-native';
33

44
import { AvatarNetworkSize } from '../../types';
5-
import AvatarNetwork from './AvatarNetwork';
5+
import { AvatarNetwork } from './AvatarNetwork';
66
import { SAMPLE_AVATARNETWORK_URIS } from './AvatarNetwork.dev';
77
import type { AvatarNetworkProps } from './AvatarNetwork.types';
88

packages/design-system-react-native/src/components/AvatarNetwork/AvatarNetwork.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { render, fireEvent } from '@testing-library/react-native';
22
import React from 'react';
33

4-
import AvatarNetwork from './AvatarNetwork';
4+
import { AvatarNetwork } from './AvatarNetwork';
55

66
const remoteImageSrc = { uri: 'https://example.com/photo.png' };
77
const remoteSvgSrc = { uri: 'https://example.com/logo.svg' };

packages/design-system-react-native/src/components/AvatarNetwork/AvatarNetwork.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ import React, { useState } from 'react';
33
import { ImageErrorEventData, NativeSyntheticEvent } from 'react-native';
44

55
import { AvatarNetworkSize, AvatarBaseShape } from '../../types';
6-
import AvatarBase from '../AvatarBase';
7-
import ImageOrSvg from '../temp-components/ImageOrSvg';
6+
import { AvatarBase } from '../AvatarBase';
7+
import { ImageOrSvg } from '../temp-components/ImageOrSvg';
88
import type { AvatarNetworkProps } from './AvatarNetwork.types';
99

10-
const AvatarNetwork = ({
10+
export const AvatarNetwork = ({
1111
src,
1212
size = AvatarNetworkSize.Md,
1313
name,
@@ -58,5 +58,3 @@ const AvatarNetwork = ({
5858
</AvatarBase>
5959
);
6060
};
61-
62-
export default AvatarNetwork;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export { AvatarNetworkSize } from '../../types';
2-
export { default } from './AvatarNetwork';
2+
export { AvatarNetwork } from './AvatarNetwork';
33
export type { AvatarNetworkProps } from './AvatarNetwork.types';

packages/design-system-react-native/src/components/AvatarToken/AvatarToken.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react-native';
22
import { View } from 'react-native';
33

44
import { AvatarTokenSize } from '../../types';
5-
import AvatarToken from './AvatarToken';
5+
import { AvatarToken } from './AvatarToken';
66
import { SAMPLE_AVATARTOKEN_URIS } from './AvatarToken.dev';
77
import type { AvatarTokenProps } from './AvatarToken.types';
88

packages/design-system-react-native/src/components/AvatarToken/AvatarToken.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { render, fireEvent } from '@testing-library/react-native';
22
import React from 'react';
33

4-
import AvatarToken from './AvatarToken';
4+
import { AvatarToken } from './AvatarToken';
55

66
const remoteImageSrc = { uri: 'https://example.com/photo.png' };
77
const remoteSvgSrc = { uri: 'https://example.com/logo.svg' };

packages/design-system-react-native/src/components/AvatarToken/AvatarToken.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ import React, { useState } from 'react';
33
import { ImageErrorEventData, NativeSyntheticEvent } from 'react-native';
44

55
import { AvatarTokenSize, AvatarBaseShape } from '../../types';
6-
import AvatarBase from '../AvatarBase';
7-
import ImageOrSvg from '../temp-components/ImageOrSvg';
6+
import { AvatarBase } from '../AvatarBase';
7+
import { ImageOrSvg } from '../temp-components/ImageOrSvg';
88
import type { AvatarTokenProps } from './AvatarToken.types';
99

10-
const AvatarToken = ({
10+
export const AvatarToken = ({
1111
src,
1212
size = AvatarTokenSize.Md,
1313
name,
@@ -58,5 +58,3 @@ const AvatarToken = ({
5858
</AvatarBase>
5959
);
6060
};
61-
62-
export default AvatarToken;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export { AvatarTokenSize } from '../../types';
2-
export { default } from './AvatarToken';
2+
export { AvatarToken } from './AvatarToken';
33
export type { AvatarTokenProps } from './AvatarToken.types';

packages/design-system-react-native/src/components/BadgeCount/BadgeCount.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react-native';
22
import { View } from 'react-native';
33

44
import { BadgeCountSize } from '../../types';
5-
import BadgeCount from './BadgeCount';
5+
import { BadgeCount } from './BadgeCount';
66
import type { BadgeCountProps } from './BadgeCount.types';
77

88
const meta: Meta<BadgeCountProps> = {

packages/design-system-react-native/src/components/BadgeCount/BadgeCount.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import { render } from '@testing-library/react-native';
33
import React from 'react';
44

55
import { BadgeCountSize } from '../../types';
6-
import Text, { TextColor, FontWeight } from '../Text';
7-
import BadgeCount from './BadgeCount';
6+
import { Text, TextColor, FontWeight } from '../Text';
7+
import { BadgeCount } from './BadgeCount';
88
import {
99
MAP_BADGECOUNT_SIZE_TEXTVARIANT,
1010
TWCLASSMAP_BADGECOUNT_SIZE_CONTAINER,

packages/design-system-react-native/src/components/BadgeCount/BadgeCount.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ import React from 'react';
44
import { View } from 'react-native';
55

66
import { BadgeCountSize } from '../../types';
7-
import Text, { TextColor, FontWeight } from '../Text';
7+
import { Text, TextColor, FontWeight } from '../Text';
88
import {
99
MAP_BADGECOUNT_SIZE_TEXTVARIANT,
1010
TWCLASSMAP_BADGECOUNT_SIZE_CONTAINER,
1111
MAP_BADGECOUNT_SIZE_LINEHEIGHT,
1212
} from './BadgeCount.constants';
1313
import type { BadgeCountProps } from './BadgeCount.types';
1414

15-
const BadgeCount = ({
15+
export const BadgeCount = ({
1616
size = BadgeCountSize.Md,
1717
count,
1818
max = 99,
@@ -45,5 +45,3 @@ const BadgeCount = ({
4545
</View>
4646
);
4747
};
48-
49-
export default BadgeCount;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export { BadgeCountSize } from '../../types';
2-
export { default } from './BadgeCount';
2+
export { BadgeCount } from './BadgeCount';
33
export type { BadgeCountProps } from './BadgeCount.types';

packages/design-system-react-native/src/components/BadgeIcon/BadgeIcon.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { Meta, StoryObj } from '@storybook/react-native';
22

33
import { IconName } from '../Icon';
4-
import BadgeIcon from './BadgeIcon';
4+
import { BadgeIcon } from './BadgeIcon';
55
import type { BadgeIconProps } from './BadgeIcon.types';
66

77
const meta: Meta<BadgeIconProps> = {

0 commit comments

Comments
 (0)