Discrepancy Between Documented and Current JSX Button Variants
The JSX button variants have changed from what is described in the MetaMask Snap Docs. Previously, the variants included primary and secondary, where primary had a blue background and secondary had no background, only borders. However, in the new JSX button implementation, which is set to replace the old style components, the variants are now limited to primary and destructive. This means that primary buttons are displayed with blue text and no background, while destructive buttons appear with red text.
It would be beneficial to retain the original primary and secondary variants and introduce a new text variant to better align with these updated styles.
@FrederikBolding
I just noticed that this issue is affecting the production version of MetaMask! As illustrated below, the buttons in the snaps have changed from their usual contained style to plain text buttons.
Before:
After:
@Nick-1979 This change is intentional. The previous button style will be strictly used for buttons in the footer of a user interface.
We are actively working on introducing this custom footer functionality.
@FrederikBolding
Thank you for the update. While I appreciate the explanation, I’m concerned that these non-backward-compatible changes, applied to production without prior announcement, could impact the appearance of snap pages. It would be helpful to have more visibility on such changes to better prepare and adapt our integrations.
Thank you for your understanding.
@Nick-1979 Appreciate the feedback! We are generally very cautious about shipping non-backward-compatible changes to the Snaps Platform and its APIs. We had assumed that the impact to the appearances of Snap UIs by making this change would be a positive one. I'll make sure we keep potential worries like your own in mind for any future changes similar to this one.