Skip to content

Commit 4de0801

Browse files
chore: add candlestick icon to component library (MetaMask#27961)
<!-- 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 adds the candlestick icon to the component-library ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: null ## **Related issues** Fixes: https://consensyssoftware.atlassian.net/browse/DSYS-656 ## **Manual testing steps** ```gherkin Feature: my feature name Scenario: user [verb for user action] Given [describe expected initial app state] When user [verb for user action] Then [describe expected outcome] ``` ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** https://github.com/user-attachments/assets/510bd10b-0729-4d20-ab0e-44fdec07ed8f <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile 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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk: adds a new SVG asset and wires it into the generated icon enum/mapping, with no changes to runtime logic beyond selecting an additional icon name. > > **Overview** > Adds a new `Candlestick` icon to the component library by introducing `assets/candlestick.svg`, extending `IconName` with `Candlestick`, and wiring the new asset into `assetByIconName`. > > Also includes minor import/mapping reordering in the generated icon asset/type files (e.g., `Search`, `MetamaskFoxOutline`) with no functional behavior change. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 0cd4fb7. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent dee9a46 commit 4de0801

3 files changed

Lines changed: 10 additions & 6 deletions

File tree

app/component-library/components/Icons/Icon/Icon.assets.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ import calendarSVG from './assets/calendar.svg';
4747
import callSVG from './assets/call.svg';
4848
import cameraSVG from './assets/camera.svg';
4949
import campaignSVG from './assets/campaign.svg';
50+
import candlestickSVG from './assets/candlestick.svg';
5051
import cardposSVG from './assets/card-pos.svg';
5152
import cardSVG from './assets/card.svg';
5253
import cashSVG from './assets/cash.svg';
@@ -152,8 +153,8 @@ import mapSVG from './assets/map.svg';
152153
import menuSVG from './assets/menu.svg';
153154
import messagequestionSVG from './assets/message-question.svg';
154155
import messagesSVG from './assets/messages.svg';
155-
import metamaskfoxoutlineSVG from './assets/metamask-fox-outline.svg';
156156
import metamaskfoxfilledSVG from './assets/metamask-fox-filled.svg';
157+
import metamaskfoxoutlineSVG from './assets/metamask-fox-outline.svg';
157158
import micSVG from './assets/mic.svg';
158159
import minusboldSVG from './assets/minus-bold.svg';
159160
import minussquareSVG from './assets/minus-square.svg';
@@ -197,8 +198,8 @@ import savingSVG from './assets/saving.svg';
197198
import scanbarcodeSVG from './assets/scan-barcode.svg';
198199
import scanfocusSVG from './assets/scan-focus.svg';
199200
import scanSVG from './assets/scan.svg';
200-
import searchSVG from './assets/search.svg';
201201
import searchfilledSVG from './assets/search-filled.svg';
202+
import searchSVG from './assets/search.svg';
202203
import securityalertSVG from './assets/security-alert.svg';
203204
import securitycrossSVG from './assets/security-cross.svg';
204205
import securitykeySVG from './assets/security-key.svg';
@@ -329,6 +330,7 @@ export const assetByIconName: AssetByIconName = {
329330
[IconName.Call]: callSVG,
330331
[IconName.Camera]: cameraSVG,
331332
[IconName.Campaign]: campaignSVG,
333+
[IconName.Candlestick]: candlestickSVG,
332334
[IconName.CardPos]: cardposSVG,
333335
[IconName.Card]: cardSVG,
334336
[IconName.Cash]: cashSVG,
@@ -434,8 +436,8 @@ export const assetByIconName: AssetByIconName = {
434436
[IconName.Menu]: menuSVG,
435437
[IconName.MessageQuestion]: messagequestionSVG,
436438
[IconName.Messages]: messagesSVG,
437-
[IconName.MetamaskFoxOutline]: metamaskfoxoutlineSVG,
438439
[IconName.MetamaskFoxFilled]: metamaskfoxfilledSVG,
440+
[IconName.MetamaskFoxOutline]: metamaskfoxoutlineSVG,
439441
[IconName.Mic]: micSVG,
440442
[IconName.MinusBold]: minusboldSVG,
441443
[IconName.MinusSquare]: minussquareSVG,
@@ -479,8 +481,8 @@ export const assetByIconName: AssetByIconName = {
479481
[IconName.ScanBarcode]: scanbarcodeSVG,
480482
[IconName.ScanFocus]: scanfocusSVG,
481483
[IconName.Scan]: scanSVG,
482-
[IconName.Search]: searchSVG,
483484
[IconName.SearchFilled]: searchfilledSVG,
485+
[IconName.Search]: searchSVG,
484486
[IconName.SecurityAlert]: securityalertSVG,
485487
[IconName.SecurityCross]: securitycrossSVG,
486488
[IconName.SecurityKey]: securitykeySVG,

app/component-library/components/Icons/Icon/Icon.types.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ export enum IconName {
117117
Call = 'Call',
118118
Camera = 'Camera',
119119
Campaign = 'Campaign',
120+
Candlestick = 'Candlestick',
120121
CardPos = 'CardPos',
121122
Card = 'Card',
122123
Cash = 'Cash',
@@ -222,8 +223,8 @@ export enum IconName {
222223
Menu = 'Menu',
223224
MessageQuestion = 'MessageQuestion',
224225
Messages = 'Messages',
225-
MetamaskFoxOutline = 'MetamaskFoxOutline',
226226
MetamaskFoxFilled = 'MetamaskFoxFilled',
227+
MetamaskFoxOutline = 'MetamaskFoxOutline',
227228
Mic = 'Mic',
228229
MinusBold = 'MinusBold',
229230
MinusSquare = 'MinusSquare',
@@ -267,8 +268,8 @@ export enum IconName {
267268
ScanBarcode = 'ScanBarcode',
268269
ScanFocus = 'ScanFocus',
269270
Scan = 'Scan',
270-
Search = 'Search',
271271
SearchFilled = 'SearchFilled',
272+
Search = 'Search',
272273
SecurityAlert = 'SecurityAlert',
273274
SecurityCross = 'SecurityCross',
274275
SecurityKey = 'SecurityKey',
Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)