Skip to content

Commit d949b75

Browse files
refactor: replace secondary colors with warning colors (#9922)
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** This PR replaces the `secondary` colors with `warning` colors, in preparation to upgrade the design-tokens package to v4 <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> ## **Related issues** Fixes: #9921 ## **Manual testing steps** 1. Render the given components 2. Observe changes 3. ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before and after** - `PendingText` ![Simulator Screenshot - iPhone 15 Pro - 2024-06-10 at 09 35 40](https://github.com/MetaMask/metamask-mobile/assets/14355083/d55b2b20-612b-45e6-b481-f05ebbe21bb3) ![Simulator Screenshot - iPhone 15 Pro - 2024-06-10 at 09 36 07](https://github.com/MetaMask/metamask-mobile/assets/14355083/af09a532-bd96-46df-99e4-f87133ce0f75) - `StyledButtons` ![Simulator Screenshot - iPhone 15 Pro - 2024-06-10 at 09 40 08](https://github.com/MetaMask/metamask-mobile/assets/14355083/f6e085ac-147c-406f-bc9a-2ce21949851f) ![Simulator Screenshot - iPhone 15 Pro - 2024-06-10 at 09 40 31](https://github.com/MetaMask/metamask-mobile/assets/14355083/502aa368-da45-46ba-8d2b-71397dbfce63) - `GasInfoIcon` + `Text` ![Simulator Screenshot - iPhone 15 Pro - 2024-06-10 at 09 47 59](https://github.com/MetaMask/metamask-mobile/assets/14355083/3ecb8fc1-70fc-40c4-8b32-0f67b6ebc903) ![Simulator Screenshot - iPhone 15 Pro - 2024-06-10 at 09 48 17](https://github.com/MetaMask/metamask-mobile/assets/14355083/b7ef6000-6598-467d-a0a7-33af3ec43fe6) <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [x] I’ve followed [MetaMask Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.
1 parent 1f706ab commit d949b75

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

app/components/Base/StatusText.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export const PendingText = (props) => {
2929
return (
3030
<Text
3131
bold
32-
style={[styles.status, { color: colors.secondary.default }]}
32+
style={[styles.status, { color: colors.warning.default }]}
3333
{...props}
3434
/>
3535
);

app/components/Base/Text/Text.styles.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const createStyles = (colors: Colors) =>
2121
color: colors.error.default,
2222
},
2323
orange: {
24-
color: colors.secondary.default,
24+
color: colors.warning.default,
2525
},
2626
black: {
2727
color: colors.text.default,

app/components/UI/StyledButton/__snapshots__/index.test.tsx.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ exports[`StyledButton should render correctly on Android the button with type or
9191
"padding": 15,
9292
},
9393
{
94-
"borderColor": "#F66A0A",
94+
"borderColor": "#BF5208",
9595
"borderWidth": 1,
9696
},
9797
null,
@@ -223,7 +223,7 @@ exports[`StyledButton should render correctly on iOS the button with type orange
223223
"padding": 15,
224224
},
225225
{
226-
"borderColor": "#F66A0A",
226+
"borderColor": "#BF5208",
227227
"borderWidth": 1,
228228
},
229229
undefined,
@@ -239,7 +239,7 @@ exports[`StyledButton should render correctly on iOS the button with type orange
239239
"textAlign": "center",
240240
},
241241
{
242-
"color": "#F66A0A",
242+
"color": "#BF5208",
243243
},
244244
undefined,
245245
]

app/components/UI/StyledButton/styledButtonStyles.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ const createStyles = (colors) =>
2020
color: colors.primary.inverse,
2121
},
2222
orange: {
23-
borderColor: colors.secondary.default,
23+
borderColor: colors.warning.default,
2424
borderWidth: 1,
2525
},
2626
orangeText: {
27-
color: colors.secondary.default,
27+
color: colors.warning.default,
2828
},
2929
infoText: {
3030
color: colors.primary.default,

app/components/Views/confirmations/components/TransactionReview/TransactionReviewEIP1559/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const createStyles = (colors) =>
3333
paddingLeft: 2,
3434
},
3535
gasInfoIcon: (hasOrigin) => ({
36-
color: hasOrigin ? colors.secondary.default : colors.icon.muted,
36+
color: hasOrigin ? colors.warning.default : colors.icon.muted,
3737
}),
3838
amountContainer: {
3939
flex: 1,

app/components/Views/confirmations/components/TransactionReview/TransactionReviewEIP1559Update/styles.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const createStyles = (colors: any) =>
1616
paddingLeft: 2,
1717
},
1818
gasInfoIcon: (hasOrigin) => ({
19-
color: hasOrigin ? colors.secondary.default : colors.icon.muted,
19+
color: hasOrigin ? colors.warning.default : colors.icon.muted,
2020
}),
2121
amountContainer: {
2222
flex: 1,

0 commit comments

Comments
 (0)