Skip to content

Commit ac0f360

Browse files
committed
docs(migration): remove non-actionable AvatarIcon sections and avoid internal shared package reference for BadgeIcon
1 parent 4ed8d84 commit ac0f360

2 files changed

Lines changed: 3 additions & 91 deletions

File tree

packages/design-system-react-native/MIGRATION.md

Lines changed: 2 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -40,56 +40,13 @@ This guide provides detailed instructions for migrating your project from one ve
4040

4141
### From version 0.20.0 to 0.21.0
4242

43-
#### AvatarIcon: enum-style exports now follow the shared const-object + string-union model
44-
45-
**What Changed:**
46-
47-
`AvatarIconSize` and `AvatarIconSeverity` now follow the same ADR-0003 and ADR-0004 type architecture already used by `Icon` and `Box`. The React Native package still exports the same names from `@metamask/design-system-react-native`, but the underlying type definitions now come from the shared cross-platform contracts.
48-
49-
**Migration:**
50-
51-
Normal usage does not need to change. Continue importing and using the same members:
52-
53-
```tsx
54-
// Before (0.20.0)
55-
import {
56-
AvatarIcon,
57-
AvatarIconSeverity,
58-
AvatarIconSize,
59-
IconName,
60-
} from '@metamask/design-system-react-native';
61-
62-
<AvatarIcon
63-
iconName={IconName.Warning}
64-
size={AvatarIconSize.Md}
65-
severity={AvatarIconSeverity.Warning}
66-
/>;
67-
68-
// After (0.21.0)
69-
import {
70-
AvatarIcon,
71-
AvatarIconSeverity,
72-
AvatarIconSize,
73-
IconName,
74-
} from '@metamask/design-system-react-native';
75-
76-
<AvatarIcon
77-
iconName={IconName.Warning}
78-
size={AvatarIconSize.Md}
79-
severity={AvatarIconSeverity.Warning}
80-
/>;
81-
```
82-
83-
**Impact:**
84-
85-
- Typical component usage is unchanged.
86-
- Only code that depended on `AvatarIconSeverity` being a TypeScript `enum` rather than a const object may need to update its typing assumptions.
43+
<!-- Removed non-actionable internal enum→const-object note for AvatarIcon -->
8744

8845
#### BadgeIcon: shared prop types are now the source of truth
8946

9047
**What Changed:**
9148

92-
`BadgeIcon` now uses shared prop contracts from `@metamask/design-system-shared` so React Native and React consume the same public type surface. This is a type-level breaking change only; the component API and runtime behavior are unchanged.
49+
`BadgeIcon` now consumes a shared prop contract so React Native and React expose the same public type surface. This is a type-level breaking change only; the component API and runtime behavior are unchanged.
9350

9451
**Migration:**
9552

packages/design-system-react/MIGRATION.md

Lines changed: 1 addition & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -993,56 +993,11 @@ This section covers version-to-version breaking changes within `@metamask/design
993993

994994
## From version 0.18.0 to 0.19.0
995995

996-
### AvatarIcon: enum-style exports now follow the shared const-object + string-union model
997-
998-
**What Changed:**
999-
1000-
`AvatarIconSize` and `AvatarIconSeverity` now follow the same ADR-0003 and ADR-0004 type architecture already used by `Icon` and `Box`. The React package still exports the same names from `@metamask/design-system-react`, but the underlying type definitions now come from the shared cross-platform contracts.
1001-
1002-
**Migration:**
1003-
1004-
Normal usage does not need to change. Continue importing and using the same members:
1005-
1006-
```tsx
1007-
// Before (0.18.0)
1008-
import {
1009-
AvatarIcon,
1010-
AvatarIconSeverity,
1011-
AvatarIconSize,
1012-
IconName,
1013-
} from '@metamask/design-system-react';
1014-
1015-
<AvatarIcon
1016-
iconName={IconName.Warning}
1017-
size={AvatarIconSize.Md}
1018-
severity={AvatarIconSeverity.Warning}
1019-
/>;
1020-
1021-
// After (0.19.0)
1022-
import {
1023-
AvatarIcon,
1024-
AvatarIconSeverity,
1025-
AvatarIconSize,
1026-
IconName,
1027-
} from '@metamask/design-system-react';
1028-
1029-
<AvatarIcon
1030-
iconName={IconName.Warning}
1031-
size={AvatarIconSize.Md}
1032-
severity={AvatarIconSeverity.Warning}
1033-
/>;
1034-
```
1035-
1036-
**Impact:**
1037-
1038-
- Typical component usage is unchanged.
1039-
- Only code that depended on `AvatarIconSeverity` being a TypeScript `enum` rather than a const object may need to update its typing assumptions.
1040-
1041996
### BadgeIcon: shared prop types are now the source of truth
1042997

1043998
**What Changed:**
1044999

1045-
`BadgeIcon` now uses shared prop contracts from `@metamask/design-system-shared` so React and React Native consume the same public type surface. This is a type-level breaking change only; the component API and runtime behavior are unchanged.
1000+
`BadgeIcon` now uses shared prop contracts so React and React Native consume the same public type surface. This is a type-level breaking change only; the component API and runtime behavior are unchanged.
10461001

10471002
**Migration:**
10481003

0 commit comments

Comments
 (0)