You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/design-system-react-native/MIGRATION.md
+2-45Lines changed: 2 additions & 45 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,56 +40,13 @@ This guide provides detailed instructions for migrating your project from one ve
40
40
41
41
### From version 0.20.0 to 0.21.0
42
42
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 -->
87
44
88
45
#### BadgeIcon: shared prop types are now the source of truth
89
46
90
47
**What Changed:**
91
48
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.
Copy file name to clipboardExpand all lines: packages/design-system-react/MIGRATION.md
+1-46Lines changed: 1 addition & 46 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -993,56 +993,11 @@ This section covers version-to-version breaking changes within `@metamask/design
993
993
994
994
## From version 0.18.0 to 0.19.0
995
995
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
-
1041
996
### BadgeIcon: shared prop types are now the source of truth
1042
997
1043
998
**What Changed:**
1044
999
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.
0 commit comments