Skip to content

Commit

Permalink
Omit children from IconProps
Browse files Browse the repository at this point in the history
  • Loading branch information
thebinij committed May 18, 2023
1 parent f5c8461 commit f8fd84a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
13 changes: 3 additions & 10 deletions ui/components/component-library/avatar-icon/avatar-icon.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ describe('AvatarIcon', () => {
<AvatarIcon
iconName={IconName.SwapHorizontal}
data-testid="avatar-icon"
children={undefined}
/>,
);
expect(getByTestId('avatar-icon')).toBeDefined();
Expand All @@ -29,31 +28,29 @@ describe('AvatarIcon', () => {
iconName={IconName.SwapHorizontal}
size={AvatarIconSize.Xs}
data-testid={AvatarIconSize.Xs}
children={undefined}
/>
<AvatarIcon
iconName={IconName.SwapHorizontal}
size={AvatarIconSize.Sm}
data-testid={AvatarIconSize.Sm}
children={undefined}
/>
<AvatarIcon
iconName={IconName.SwapHorizontal}
size={AvatarIconSize.Md}
data-testid={AvatarIconSize.Md}
children={undefined}

/>
<AvatarIcon
iconName={IconName.SwapHorizontal}
size={AvatarIconSize.Lg}
data-testid={AvatarIconSize.Lg}
children={undefined}

/>
<AvatarIcon
iconName={IconName.SwapHorizontal}
size={AvatarIconSize.Xl}
data-testid={AvatarIconSize.Xl}
children={undefined}

/>
</>,
);
Expand All @@ -80,7 +77,6 @@ describe('AvatarIcon', () => {
iconName={IconName.SwapHorizontal}
className="mm-avatar-icon--test"
data-testid="classname"
children={undefined}
/>,
);
expect(getByTestId('classname')).toHaveClass('mm-avatar-icon--test');
Expand All @@ -91,7 +87,6 @@ describe('AvatarIcon', () => {
<AvatarIcon
iconName={IconName.SwapHorizontal}
iconProps={{ 'data-testid': 'avatar-icon' }}
children={undefined}
/>,
);

Expand All @@ -105,7 +100,6 @@ describe('AvatarIcon', () => {
color={IconColor.successDefault}
backgroundColor={BackgroundColor.successMuted}
data-testid="success"
children={undefined}
/>,
);

Expand All @@ -120,7 +114,6 @@ describe('AvatarIcon', () => {
<AvatarIcon
iconName={IconName.SwapHorizontal}
ref={ref}
children={undefined}
/>,
);
expect(ref.current).not.toBeNull();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export enum AvatarIconSize {
Xl = 'xl',
}

export interface AvatarIconProps extends Omit<AvatarBaseProps, 'color'> {
export interface AvatarIconProps extends Omit<AvatarBaseProps, 'color'| 'children'> {
/**
* The name of the icon to display. Should be one of IconName
*/
Expand Down

0 comments on commit f8fd84a

Please sign in to comment.