Skip to content

Commit

Permalink
chore: export TrustedBadgeIcon
Browse files Browse the repository at this point in the history
  • Loading branch information
anuraghazra committed Jul 12, 2024
1 parent 58c72ff commit edb42df
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 19 deletions.
14 changes: 0 additions & 14 deletions packages/blade/src/components/Avatar/TrustedBadge.native.tsx

This file was deleted.

14 changes: 14 additions & 0 deletions packages/blade/src/components/Avatar/TrustedBadgeIcon.native.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { throwBladeError } from '~utils/logger';

import type { IconComponent } from '~components/Icons';

const TrustedBadgeIcon: IconComponent = () => {
throwBladeError({
message: 'TrustedBadgeIcon is not yet implemented for React Native',
moduleName: 'TrustedBadgeIcon',
});

return <></>;
};

export { TrustedBadgeIcon };
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { IconComponent } from '~components/Icons';
import useIconProps from '~components/Icons/useIconProps';
import Svg, { Path } from '~components/Icons/_Svg';

const TrustedBadge: IconComponent = (props) => {
const TrustedBadgeIcon: IconComponent = (props) => {
const { width, height } = useIconProps(props);
return (
<Svg display="block" width={width} height={height} viewBox="0 0 19 20" fill="none">
Expand Down Expand Up @@ -149,4 +149,4 @@ const TrustedBadge: IconComponent = (props) => {
);
};

export { TrustedBadge };
export { TrustedBadgeIcon };
6 changes: 3 additions & 3 deletions packages/blade/src/components/Avatar/docs/Avatar.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { StoryFn, Meta } from '@storybook/react';
import type { AvatarProps } from '../Avatar';
import { Avatar as AvatarComponent } from '../Avatar';
import { TrustedBadge } from '../TrustedBadge';
import { TrustedBadgeIcon } from '../TrustedBadgeIcon';
import { Heading } from '~components/Typography/Heading';
import { Box } from '~components/Box';
import { Sandbox } from '~utils/storybook/Sandbox';
Expand Down Expand Up @@ -214,14 +214,14 @@ const AvatarWithAddonsTemplate: StoryFn<typeof AvatarComponent> = (args) => {
{...args}
size={size}
topAddon={<Indicator color="negative" />}
bottomAddon={TrustedBadge}
bottomAddon={TrustedBadgeIcon}
/>
<AvatarComponent
{...args}
variant="square"
size={size}
topAddon={<Indicator color="negative" />}
bottomAddon={TrustedBadge}
bottomAddon={TrustedBadgeIcon}
/>
</Box>
))}
Expand Down
1 change: 1 addition & 0 deletions packages/blade/src/components/Avatar/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export * from './Avatar';
export * from './AvatarGroup';
export * from './TrustedBadgeIcon';

0 comments on commit edb42df

Please sign in to comment.