Skip to content

chore: updating dsrn to use named exports instead of default exports #650

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 11, 2025
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
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react-native';
import { View } from 'react-native';

import { AvatarAccountSize, AvatarAccountVariant } from '../../types';
import AvatarAccount from './AvatarAccount';
import { AvatarAccount } from './AvatarAccount';
import { SAMPLE_AVATARACCOUNT_ADDRESSES } from './AvatarAccount.constants';
import type { AvatarAccountProps } from './AvatarAccount.types';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { render } from '@testing-library/react-native';
import React from 'react';

import { AvatarAccountSize, AvatarAccountVariant } from '../../types';
import AvatarAccount from './AvatarAccount';
import { AvatarAccount } from './AvatarAccount';
import { SAMPLE_AVATARACCOUNT_ADDRESSES } from './AvatarAccount.constants';

jest.mock('react-native-svg', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import {
AvatarBaseShape,
AvatarAccountVariant,
} from '../../types';
import AvatarBase from '../AvatarBase';
import Blockies from '../temp-components/Blockies';
import Jazzicon from '../temp-components/Jazzicon';
import Maskicon from '../temp-components/Maskicon';
import { AvatarBase } from '../AvatarBase';
import { Blockies } from '../temp-components/Blockies';
import { Jazzicon } from '../temp-components/Jazzicon';
import { Maskicon } from '../temp-components/Maskicon';
import type { AvatarAccountProps } from './AvatarAccount.types';

const AvatarAccount = ({
export const AvatarAccount = ({
address,
variant = AvatarAccountVariant.Jazzicon,
size = AvatarAccountSize.Md,
Expand Down Expand Up @@ -53,5 +53,3 @@ const AvatarAccount = ({
</AvatarBase>
);
};

export default AvatarAccount;
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export { AvatarAccountSize, AvatarAccountVariant } from '../../types';
export { default } from './AvatarAccount';
export { AvatarAccount } from './AvatarAccount';
export type { AvatarAccountProps } from './AvatarAccount.types';
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import type { Meta, StoryObj } from '@storybook/react-native';
import { View } from 'react-native';

import { AvatarBaseSize, AvatarBaseShape } from '../../types';
import ImageOrSvg from '../temp-components/ImageOrSvg';
import Icon, { IconName } from '../Icon';
import AvatarBase from './AvatarBase';
import { ImageOrSvg } from '../temp-components/ImageOrSvg';
import { Icon, IconName } from '../Icon';
import { AvatarBase } from './AvatarBase';
import { SAMPLE_AVATARBASE_URIS } from './AvatarBase.dev';
import type { AvatarBaseProps } from './AvatarBase.types';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { render } from '@testing-library/react-native';
import React from 'react';

import { AvatarBaseSize, AvatarBaseShape } from '../../types';
import Text, { TextColor, TextVariant } from '../Text';
import AvatarBase from './AvatarBase';
import { Text, TextColor, TextVariant } from '../Text';
import { AvatarBase } from './AvatarBase';
import {
TWCLASSMAP_AVATARBASE_SIZE_DIMENSION,
TWCLASSMAP_AVATARBASE_HASBORDER_SIZE_DIMENSION,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import React from 'react';
import { View } from 'react-native';

import { AvatarBaseSize, AvatarBaseShape } from '../../types';
import Text, { TextColor, TextVariant, FontWeight } from '../Text';
import { Text, TextColor, TextVariant, FontWeight } from '../Text';
import {
TWCLASSMAP_AVATARBASE_SIZE_DIMENSION,
TWCLASSMAP_AVATARBASE_HASBORDER_SIZE_DIMENSION,
Expand All @@ -13,7 +13,7 @@ import {
} from './AvatarBase.constants';
import type { AvatarBaseProps } from './AvatarBase.types';

const AvatarBase = ({
export const AvatarBase = ({
children,
size = AvatarBaseSize.Md,
shape = AvatarBaseShape.Circle,
Expand Down Expand Up @@ -55,5 +55,3 @@ const AvatarBase = ({
</View>
);
};

export default AvatarBase;
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export { AvatarBaseSize, AvatarBaseShape } from '../../types';
export { default } from './AvatarBase';
export { AvatarBase } from './AvatarBase';
export type { AvatarBaseProps } from './AvatarBase.types';
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react-native';
import { View } from 'react-native';

import { AvatarFaviconSize } from '../../types';
import AvatarFavicon from './AvatarFavicon';
import { AvatarFavicon } from './AvatarFavicon';
import { SAMPLE_AVATARFAVICON_URIS } from './AvatarFavicon.dev';
import type { AvatarFaviconProps } from './AvatarFavicon.types';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { render, fireEvent } from '@testing-library/react-native';
import React from 'react';

import AvatarFavicon from './AvatarFavicon';
import { AvatarFavicon } from './AvatarFavicon';

const remoteImageSrc = { uri: 'https://example.com/photo.png' };
const remoteSvgSrc = { uri: 'https://example.com/logo.svg' };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import React, { useState } from 'react';
import { ImageErrorEventData, NativeSyntheticEvent } from 'react-native';

import { AvatarFaviconSize, AvatarBaseShape } from '../../types';
import AvatarBase from '../AvatarBase';
import ImageOrSvg from '../temp-components/ImageOrSvg';
import { AvatarBase } from '../AvatarBase';
import { ImageOrSvg } from '../temp-components/ImageOrSvg';
import type { AvatarFaviconProps } from './AvatarFavicon.types';

const AvatarFavicon = ({
export const AvatarFavicon = ({
src,
size = AvatarFaviconSize.Md,
name,
Expand Down Expand Up @@ -58,5 +58,3 @@ const AvatarFavicon = ({
</AvatarBase>
);
};

export default AvatarFavicon;
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export { AvatarFaviconSize } from '../../types';
export { default } from './AvatarFavicon';
export { AvatarFavicon } from './AvatarFavicon';
export type { AvatarFaviconProps } from './AvatarFavicon.types';
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react-native';
import { ScrollView, View } from 'react-native';

import { AvatarGroupSize, AvatarGroupVariant } from '../../types';
import AvatarGroup from './AvatarGroup';
import { AvatarGroup } from './AvatarGroup';
import {
SAMPLE_AVATARGROUP_AVATARACCOUNTPROPSARR,
SAMPLE_AVATARGROUP_AVATARFAVICONPROPSARR,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { render } from '@testing-library/react-native';
import React from 'react';

import { AvatarGroupVariant, AvatarGroupSize } from '../../types';
import AvatarGroup from './AvatarGroup';
import { AvatarGroup } from './AvatarGroup';
import {
SAMPLE_AVATARGROUP_AVATARACCOUNTPROPSARR,
SAMPLE_AVATARGROUP_AVATARFAVICONPROPSARR,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ import React, { useCallback } from 'react';
import { View } from 'react-native';

import { AvatarGroupSize, AvatarGroupVariant } from '../../types';
import AvatarAccount, { AvatarAccountProps } from '../AvatarAccount';
import AvatarBase, { AvatarBaseShape } from '../AvatarBase';
import AvatarFavicon, { AvatarFaviconProps } from '../AvatarFavicon';
import AvatarNetwork, { AvatarNetworkProps } from '../AvatarNetwork';
import AvatarToken, { AvatarTokenProps } from '../AvatarToken';
import Text, { TextColor } from '../Text';
import { AvatarAccount, AvatarAccountProps } from '../AvatarAccount';
import { AvatarBase, AvatarBaseShape } from '../AvatarBase';
import { AvatarFavicon, AvatarFaviconProps } from '../AvatarFavicon';
import { AvatarNetwork, AvatarNetworkProps } from '../AvatarNetwork';
import { AvatarToken, AvatarTokenProps } from '../AvatarToken';
import { Text, TextColor } from '../Text';
import {
MAP_AVATARGROUP_SIZE_OVERFLOWTEXT_TEXTVARIANT,
TWCLASSMAP_AVATARGROUP_SIZE_SPACEBETWEENAVATARS,
} from './AvatarGroup.constants';
import { AvatarGroupProps } from './AvatarGroup.types';

const AvatarGroup = ({
export const AvatarGroup = ({
variant,
avatarPropsArr,
size = AvatarGroupSize.Md,
Expand Down Expand Up @@ -107,5 +107,3 @@ const AvatarGroup = ({
</View>
);
};

export default AvatarGroup;
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export { AvatarGroupSize, AvatarGroupVariant } from '../../types';
export { default } from './AvatarGroup';
export { AvatarGroup } from './AvatarGroup';
export type { AvatarGroupProps } from './AvatarGroup.types';
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react-native';
import { View } from 'react-native';

import { AvatarIconSize, AvatarIconSeverity } from '../../types';
import AvatarIcon from './AvatarIcon';
import { AvatarIcon } from './AvatarIcon';
import type { AvatarIconProps } from './AvatarIcon.types';
import { IconName } from '../Icon';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import React from 'react';

import { AvatarIconSeverity, AvatarIconSize } from '../../types';
import { IconName } from '../Icon';
import AvatarIcon from './AvatarIcon';
import { AvatarIcon } from './AvatarIcon';
import {
TWCLASSMAP_AVATARICON_SEVERITY_BACKGROUNDCOLOR,
MAP_AVATARICON_SEVERITY_ICONCOLOR,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ import {
AvatarBaseShape,
AvatarIconSeverity,
} from '../../types';
import AvatarBase from '../AvatarBase';
import Icon from '../Icon';
import { AvatarBase } from '../AvatarBase';
import { Icon } from '../Icon';
import {
MAP_AVATARICON_SIZE_ICONSIZE,
MAP_AVATARICON_SEVERITY_ICONCOLOR,
TWCLASSMAP_AVATARICON_SEVERITY_BACKGROUNDCOLOR,
} from './AvatarIcon.constants';
import type { AvatarIconProps } from './AvatarIcon.types';

const AvatarIcon = ({
export const AvatarIcon = ({
size = AvatarIconSize.Md,
shape = AvatarBaseShape.Circle,
severity = AvatarIconSeverity.Neutral,
Expand Down Expand Up @@ -49,5 +49,3 @@ const AvatarIcon = ({
</AvatarBase>
);
};

export default AvatarIcon;
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export { AvatarIconSize, AvatarIconSeverity } from '../../types';
export { default } from './AvatarIcon';
export { AvatarIcon } from './AvatarIcon';
export type { AvatarIconProps } from './AvatarIcon.types';
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react-native';
import { View } from 'react-native';

import { AvatarNetworkSize } from '../../types';
import AvatarNetwork from './AvatarNetwork';
import { AvatarNetwork } from './AvatarNetwork';
import { SAMPLE_AVATARNETWORK_URIS } from './AvatarNetwork.dev';
import type { AvatarNetworkProps } from './AvatarNetwork.types';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { render, fireEvent } from '@testing-library/react-native';
import React from 'react';

import AvatarNetwork from './AvatarNetwork';
import { AvatarNetwork } from './AvatarNetwork';

const remoteImageSrc = { uri: 'https://example.com/photo.png' };
const remoteSvgSrc = { uri: 'https://example.com/logo.svg' };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import React, { useState } from 'react';
import { ImageErrorEventData, NativeSyntheticEvent } from 'react-native';

import { AvatarNetworkSize, AvatarBaseShape } from '../../types';
import AvatarBase from '../AvatarBase';
import ImageOrSvg from '../temp-components/ImageOrSvg';
import { AvatarBase } from '../AvatarBase';
import { ImageOrSvg } from '../temp-components/ImageOrSvg';
import type { AvatarNetworkProps } from './AvatarNetwork.types';

const AvatarNetwork = ({
export const AvatarNetwork = ({
src,
size = AvatarNetworkSize.Md,
name,
Expand Down Expand Up @@ -58,5 +58,3 @@ const AvatarNetwork = ({
</AvatarBase>
);
};

export default AvatarNetwork;
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export { AvatarNetworkSize } from '../../types';
export { default } from './AvatarNetwork';
export { AvatarNetwork } from './AvatarNetwork';
export type { AvatarNetworkProps } from './AvatarNetwork.types';
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react-native';
import { View } from 'react-native';

import { AvatarTokenSize } from '../../types';
import AvatarToken from './AvatarToken';
import { AvatarToken } from './AvatarToken';
import { SAMPLE_AVATARTOKEN_URIS } from './AvatarToken.dev';
import type { AvatarTokenProps } from './AvatarToken.types';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { render, fireEvent } from '@testing-library/react-native';
import React from 'react';

import AvatarToken from './AvatarToken';
import { AvatarToken } from './AvatarToken';

const remoteImageSrc = { uri: 'https://example.com/photo.png' };
const remoteSvgSrc = { uri: 'https://example.com/logo.svg' };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import React, { useState } from 'react';
import { ImageErrorEventData, NativeSyntheticEvent } from 'react-native';

import { AvatarTokenSize, AvatarBaseShape } from '../../types';
import AvatarBase from '../AvatarBase';
import ImageOrSvg from '../temp-components/ImageOrSvg';
import { AvatarBase } from '../AvatarBase';
import { ImageOrSvg } from '../temp-components/ImageOrSvg';
import type { AvatarTokenProps } from './AvatarToken.types';

const AvatarToken = ({
export const AvatarToken = ({
src,
size = AvatarTokenSize.Md,
name,
Expand Down Expand Up @@ -58,5 +58,3 @@ const AvatarToken = ({
</AvatarBase>
);
};

export default AvatarToken;
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export { AvatarTokenSize } from '../../types';
export { default } from './AvatarToken';
export { AvatarToken } from './AvatarToken';
export type { AvatarTokenProps } from './AvatarToken.types';
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react-native';
import { View } from 'react-native';

import { BadgeCountSize } from '../../types';
import BadgeCount from './BadgeCount';
import { BadgeCount } from './BadgeCount';
import type { BadgeCountProps } from './BadgeCount.types';

const meta: Meta<BadgeCountProps> = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { render } from '@testing-library/react-native';
import React from 'react';

import { BadgeCountSize } from '../../types';
import Text, { TextColor, FontWeight } from '../Text';
import BadgeCount from './BadgeCount';
import { Text, TextColor, FontWeight } from '../Text';
import { BadgeCount } from './BadgeCount';
import {
MAP_BADGECOUNT_SIZE_TEXTVARIANT,
TWCLASSMAP_BADGECOUNT_SIZE_CONTAINER,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ import React from 'react';
import { View } from 'react-native';

import { BadgeCountSize } from '../../types';
import Text, { TextColor, FontWeight } from '../Text';
import { Text, TextColor, FontWeight } from '../Text';
import {
MAP_BADGECOUNT_SIZE_TEXTVARIANT,
TWCLASSMAP_BADGECOUNT_SIZE_CONTAINER,
MAP_BADGECOUNT_SIZE_LINEHEIGHT,
} from './BadgeCount.constants';
import type { BadgeCountProps } from './BadgeCount.types';

const BadgeCount = ({
export const BadgeCount = ({
size = BadgeCountSize.Md,
count,
max = 99,
Expand Down Expand Up @@ -45,5 +45,3 @@ const BadgeCount = ({
</View>
);
};

export default BadgeCount;
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export { BadgeCountSize } from '../../types';
export { default } from './BadgeCount';
export { BadgeCount } from './BadgeCount';
export type { BadgeCountProps } from './BadgeCount.types';
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Meta, StoryObj } from '@storybook/react-native';

import { IconName } from '../Icon';
import BadgeIcon from './BadgeIcon';
import { BadgeIcon } from './BadgeIcon';
import type { BadgeIconProps } from './BadgeIcon.types';

const meta: Meta<BadgeIconProps> = {
Expand Down
Loading
Loading