diff --git a/ui/components/app/snaps/snap-ui-footer-button/index.scss b/ui/components/app/snaps/snap-ui-footer-button/index.scss index db46c4928592..fc9f94e2bac8 100644 --- a/ui/components/app/snaps/snap-ui-footer-button/index.scss +++ b/ui/components/app/snaps/snap-ui-footer-button/index.scss @@ -45,6 +45,14 @@ } } + &.mm-button-secondary { + &:hover:not(&--disabled) { + & > span { + color: var(--color-primary-inverse); + } + } + } + &--disabled { cursor: default !important; } diff --git a/ui/components/app/snaps/snap-ui-renderer/components/footer.ts b/ui/components/app/snaps/snap-ui-renderer/components/footer.ts index 03aaace0bed8..d08284bcf572 100644 --- a/ui/components/app/snaps/snap-ui-renderer/components/footer.ts +++ b/ui/components/app/snaps/snap-ui-renderer/components/footer.ts @@ -45,6 +45,7 @@ const getDefaultButtons = ( key: 'default-button', props: { onCancel, + variant: ButtonVariant.Secondary, isSnapAction: false, }, children: t('cancel'), @@ -62,8 +63,9 @@ export const footer: UIComponentFactory = ({ }) => { const defaultButtons = getDefaultButtons(element, t, onCancel); + const providedChildren = getJsxChildren(element); const footerChildren: UIComponent[] = ( - getJsxChildren(element) as ButtonElement[] + providedChildren as ButtonElement[] ).map((children, index) => { const buttonMapped = buttonFn({ ...params, @@ -74,7 +76,10 @@ export const footer: UIComponentFactory = ({ key: `snap-footer-button-${buttonMapped.props?.name ?? index}`, props: { ...buttonMapped.props, - variant: index === 0 ? ButtonVariant.Secondary : ButtonVariant.Primary, + variant: + providedChildren.length === 2 && index === 0 + ? ButtonVariant.Secondary + : ButtonVariant.Primary, isSnapAction: true, }, children: buttonMapped.children,