-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
…7303) ## **Description** This PR makes the button not use the snap branding when the `hideSnapsBranding` flag is set to `true`. It also fixes an issue with the snap homepage footer having a margin when only one button is rendered in the footer. The `snap-footer-button` was also renamed `snap-ui-renderer__footer-button` to conform to the conventional naming of ui elements used in the `snap-ui-renderer` [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/27303?quickstart=1) ## **Related issues** Fixes: N/A ## **Manual testing steps** 1. Go to test-snaps 2. Try the preinstalled example snap ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** ![image](https://github.com/user-attachments/assets/31e1fd4b-bc6b-40d9-8d33-d941a8088479) ![image](https://github.com/user-attachments/assets/4b7551cf-0b11-4fd4-83a2-2369f5feecae) ### **After** ![image](https://github.com/user-attachments/assets/c31cbc9c-0cd0-45a4-b48c-e52cfece9a41) ![image](https://github.com/user-attachments/assets/96f6bfaa-7dc6-4033-ab94-913dad2a4060) ## **Pre-merge author checklist** - [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.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.
- Loading branch information
1 parent
27d8a54
commit c323433
Showing
10 changed files
with
99 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
.snap-ui-renderer__footer-button { | ||
&:not(.hide-snap-branding) { | ||
&.mm-button-primary { | ||
box-shadow: none; | ||
color: var(--color-text-alternative); | ||
background-color: var(--color-icon-default); | ||
|
||
&:hover:not(&--disabled) { | ||
opacity: 80%; | ||
box-shadow: none; | ||
} | ||
|
||
&:active:not(&--disabled) { | ||
opacity: 60%; | ||
} | ||
} | ||
|
||
&.mm-button-secondary { | ||
border-color: var(--color-icon-default); | ||
color: var(--color-icon-default); | ||
|
||
& span { | ||
color: var(--color-icon-default); | ||
} | ||
|
||
&:hover:not(&--disabled) { | ||
border-color: var(--color-icon-default); | ||
color: var(--color-background-default); | ||
background-color: var(--color-background-default-hover); | ||
box-shadow: none; | ||
|
||
& span { | ||
color: var(--color-icon-default); | ||
} | ||
} | ||
|
||
&:active:not(&--disabled) { | ||
border-color: var(--color-icon-default); | ||
opacity: 60%; | ||
|
||
& span { | ||
color: var(--color-icon-default); | ||
} | ||
} | ||
} | ||
} | ||
|
||
&--disabled { | ||
cursor: default !important; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './snap-ui-footer-button'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters