-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(snaps): Enable destructive footer buttons in Snap UI #29966
base: main
Are you sure you want to change the base?
Conversation
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
62ea315
to
f47b917
Compare
Builds ready [f47b917]
Page Load Metrics (1653 ± 51 ms)
Bundle size diffs
|
@@ -88,6 +90,7 @@ export const SnapUIFooterButton: FunctionComponent< | |||
flexDirection: FlexDirection.Row, | |||
}} | |||
data-theme={null} | |||
danger={variant === 'destructive'} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -77,9 +77,10 @@ export const footer: UIComponentFactory<FooterElement> = ({ | |||
props: { | |||
...buttonMapped.props, | |||
variant: | |||
providedChildren.length === 2 && index === 0 | |||
buttonMapped.props?.variant ?? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@GuillaumeRx Should take a look at this, I'm assuming we weren't intending to let users override this in all cases
Description
Add/enable destructive (danger) button in Snaps UI custom footer.
Related issues
Fixes: MetaMask/snaps#3015
Manual testing steps
destructive
variant.destructive
anddisabled
and check if it's rendered correctly.Example:
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist