UX Papercuts Epic: Create a consistent representation of the Buttons (#12096)

feature/default_network_editable
Niranjana Binoy 3 years ago committed by GitHub
parent 68d7ff73c5
commit 68259ee3e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      test/e2e/metamask-ui.spec.js
  2. 6
      test/e2e/tests/custom-rpc-history.spec.js
  3. 2
      test/e2e/tests/from-import-ui.spec.js
  4. 2
      test/e2e/tests/incremental-security.spec.js
  5. 5
      ui/components/app/account-menu/account-menu.component.js
  6. 3
      ui/components/app/account-menu/account-menu.test.js
  7. 6
      ui/components/app/account-menu/index.scss
  8. 1
      ui/components/app/alerts/invalid-custom-network-alert/invalid-custom-network-alert.scss
  9. 1
      ui/components/app/alerts/unconnected-account-alert/unconnected-account-alert.js
  10. 1
      ui/components/app/alerts/unconnected-account-alert/unconnected-account-alert.scss
  11. 1
      ui/components/app/app-components.scss
  12. 5
      ui/components/app/cancel-button/cancel-button.js
  13. 1
      ui/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-content.component.js
  14. 1
      ui/components/app/confirm-page-container/confirm-page-container.component.js
  15. 2
      ui/components/app/home-notification/index.scss
  16. 6
      ui/components/app/loading-network-screen/index.scss
  17. 2
      ui/components/app/loading-network-screen/loading-network-screen.component.js
  18. 2
      ui/components/app/metamask-template-renderer/metamask-template-renderer.stories.js
  19. 9
      ui/components/app/modal/modal.component.js
  20. 10
      ui/components/app/modal/modal.component.test.js
  21. 1
      ui/components/app/modals/cancel-transaction/cancel-transaction.component.js
  22. 2
      ui/components/app/modals/confirm-delete-network/confirm-delete-network.component.js
  23. 4
      ui/components/app/modals/confirm-delete-network/confirm-delete-network.test.js
  24. 1
      ui/components/app/modals/confirm-remove-account/confirm-remove-account.component.js
  25. 4
      ui/components/app/modals/confirm-remove-account/confirm-remove-account.test.js
  26. 2
      ui/components/app/modals/confirm-reset-account/confirm-reset-account.component.js
  27. 6
      ui/components/app/modals/confirm-reset-account/confirm-reset-account.test.js
  28. 3
      ui/components/app/modals/customize-nonce/customize-nonce.component.js
  29. 1
      ui/components/app/modals/edit-approval-permission/edit-approval-permission.component.js
  30. 6
      ui/components/app/modals/export-private-key-modal/export-private-key-modal.component.js
  31. 4
      ui/components/app/modals/hide-token-confirmation-modal/hide-token-confirmation-modal.js
  32. 1
      ui/components/app/modals/metametrics-opt-in-modal/metametrics-opt-in-modal.component.js
  33. 4
      ui/components/app/modals/metametrics-opt-in-modal/metametrics-opt-in-modal.test.js
  34. 1
      ui/components/app/modals/qr-scanner/qr-scanner.component.js
  35. 1
      ui/components/app/modals/reject-transactions/reject-transactions.component.js
  36. 4
      ui/components/app/modals/reject-transactions/reject-transactions.test.js
  37. 4
      ui/components/app/modals/transaction-confirmed/transaction-confirmed.test.js
  38. 1
      ui/components/app/permission-page-container/permission-page-container.component.js
  39. 2
      ui/components/app/recovery-phrase-reminder/recovery-phrase-reminder.js
  40. 4
      ui/components/app/signature-request-original/signature-request-original.component.js
  41. 1
      ui/components/app/signature-request/signature-request-footer/index.scss
  42. 2
      ui/components/app/signature-request/signature-request-footer/signature-request-footer.component.js
  43. 2
      ui/components/app/signature-request/signature-request.container.test.js
  44. 7
      ui/components/app/transaction-list-item-details/index.scss
  45. 4
      ui/components/app/transaction-list-item-details/transaction-list-item-details.component.js
  46. 3
      ui/components/app/transaction-list-item/transaction-list-item.component.js
  47. 1
      ui/components/app/transaction-list/transaction-list.component.js
  48. 1
      ui/components/app/whats-new-popup/whats-new-popup.js
  49. 6
      ui/components/ui/button/button.component.js
  50. 4
      ui/components/ui/page-container/page-container-footer/page-container-footer.component.js
  51. 2
      ui/components/ui/page-container/page-container-footer/page-container-footer.component.test.js
  52. 1
      ui/components/ui/page-container/page-container.component.js
  53. 1
      ui/components/ui/truncated-definition-list/truncated-definition-list.js
  54. 3
      ui/css/itcss/components/send.scss
  55. 4
      ui/pages/confirm-add-suggested-token/confirm-add-suggested-token.component.js
  56. 4
      ui/pages/confirm-decrypt-message/confirm-decrypt-message.component.js
  57. 4
      ui/pages/confirm-encryption-public-key/confirm-encryption-public-key.component.js
  58. 4
      ui/pages/confirm-import-token/confirm-import-token.component.js
  59. 4
      ui/pages/confirmation/components/confirmation-footer/confirmation-footer.js
  60. 2
      ui/pages/create-account/connect-hardware/account-list.js
  61. 4
      ui/pages/create-account/import-account/json.js
  62. 4
      ui/pages/create-account/import-account/private-key.js
  63. 4
      ui/pages/create-account/new-account.component.js
  64. 1
      ui/pages/first-time-flow/metametrics-opt-in/metametrics-opt-in.component.js
  65. 2
      ui/pages/first-time-flow/metametrics-opt-in/metametrics-opt-in.test.js
  66. 5
      ui/pages/keychains/index.scss
  67. 2
      ui/pages/keychains/restore-vault.js
  68. 8
      ui/pages/keychains/reveal-seed.js
  69. 8
      ui/pages/mobile-sync/mobile-sync.component.js
  70. 1
      ui/pages/onboarding-flow/new-account/new-account.js
  71. 1
      ui/pages/onboarding-flow/recovery-phrase/confirm-recovery-phrase.js
  72. 2
      ui/pages/onboarding-flow/recovery-phrase/review-recovery-phrase.js
  73. 2
      ui/pages/permissions-connect/choose-account/choose-account.component.js
  74. 2
      ui/pages/permissions-connect/choose-account/index.scss
  75. 1
      ui/pages/permissions-connect/permissions-connect.stories.js
  76. 1
      ui/pages/settings/contact-list-tab/add-contact/add-contact.component.js
  77. 1
      ui/pages/settings/contact-list-tab/contact-list-tab.component.js
  78. 1
      ui/pages/settings/contact-list-tab/edit-contact/edit-contact.component.js
  79. 1
      ui/pages/settings/contact-list-tab/index.scss
  80. 4
      ui/pages/settings/networks-tab/index.scss
  81. 4
      ui/pages/settings/networks-tab/network-form/network-form.component.js
  82. 2
      ui/pages/settings/networks-tab/networks-tab.component.js
  83. 4
      ui/pages/swaps/import-token/import-token.js
  84. 2
      ui/pages/swaps/searchable-item-list/item-list/item-list.component.js
  85. 1
      ui/pages/swaps/select-quote-popover/index.scss
  86. 4
      ui/pages/swaps/select-quote-popover/select-quote-popover.js
  87. 4
      ui/pages/swaps/swaps-footer/__snapshots__/swaps-footer.test.js.snap
  88. 1
      ui/pages/swaps/swaps-footer/swaps-footer.js
  89. 1
      ui/pages/unlock-page/index.scss
  90. 4
      ui/pages/unlock-page/unlock-page.component.js

@ -100,7 +100,7 @@ describe('MetaMask', function () {
}); });
it('clicks the "No thanks" option on the metametrics opt-in screen', async function () { it('clicks the "No thanks" option on the metametrics opt-in screen', async function () {
await driver.clickElement('.btn-default'); await driver.clickElement('.btn-secondary');
await driver.delay(largeDelayMs); await driver.delay(largeDelayMs);
}); });

@ -48,7 +48,7 @@ describe('Stores custom RPC history', function () {
await chainIdInput.clear(); await chainIdInput.clear();
await chainIdInput.sendKeys(chainId.toString()); await chainIdInput.sendKeys(chainId.toString());
await driver.clickElement('.network-form__footer .btn-secondary'); await driver.clickElement('.network-form__footer .btn-primary');
await driver.findElement({ text: networkName, tag: 'span' }); await driver.findElement({ text: networkName, tag: 'span' });
}, },
); );
@ -192,7 +192,7 @@ describe('Stores custom RPC history', function () {
await driver.clickElement({ text: 'Custom RPC', tag: 'span' }); await driver.clickElement({ text: 'Custom RPC', tag: 'span' });
// cancel new custom rpc // cancel new custom rpc
await driver.clickElement('.network-form__footer button.btn-default'); await driver.clickElement('.network-form__footer button.btn-secondary');
const networkListItems = await driver.findClickableElements( const networkListItems = await driver.findClickableElements(
'.networks-tab__networks-list-name', '.networks-tab__networks-list-name',
@ -209,7 +209,7 @@ describe('Stores custom RPC history', function () {
); );
await driver.clickElement( await driver.clickElement(
'.button.btn-danger.modal-container__footer-button', '.button.btn-danger-primary.modal-container__footer-button',
); );
// wait for confirm delete modal to be removed from DOM. // wait for confirm delete modal to be removed from DOM.

@ -38,7 +38,7 @@ describe('Metamask Import UI', function () {
await driver.clickElement({ text: 'Import wallet', tag: 'button' }); await driver.clickElement({ text: 'Import wallet', tag: 'button' });
// clicks the "No thanks" option on the metametrics opt-in screen // clicks the "No thanks" option on the metametrics opt-in screen
await driver.clickElement('.btn-default'); await driver.clickElement('.btn-secondary');
// Import Secret Recovery Phrase // Import Secret Recovery Phrase
await driver.fill( await driver.fill(

@ -42,7 +42,7 @@ describe('Incremental Security', function () {
await driver.clickElement({ text: 'Create a Wallet', tag: 'button' }); await driver.clickElement({ text: 'Create a Wallet', tag: 'button' });
// clicks the "No thanks" option on the metametrics opt-in screen // clicks the "No thanks" option on the metametrics opt-in screen
await driver.clickElement('.btn-default'); await driver.clickElement('.btn-secondary');
// accepts a secure password // accepts a secure password
await driver.fill( await driver.fill(

@ -19,6 +19,7 @@ import {
} from '../../../helpers/constants/routes'; } from '../../../helpers/constants/routes';
import TextField from '../../ui/text-field'; import TextField from '../../ui/text-field';
import SearchIcon from '../../ui/search-icon'; import SearchIcon from '../../ui/search-icon';
import Button from '../../ui/button';
import { isBeta } from '../../../helpers/utils/build-types'; import { isBeta } from '../../../helpers/utils/build-types';
@ -324,7 +325,7 @@ export default class AccountMenu extends Component {
<div className="account-menu__close-area" onClick={toggleAccountMenu} /> <div className="account-menu__close-area" onClick={toggleAccountMenu} />
<AccountMenuItem className="account-menu__header"> <AccountMenuItem className="account-menu__header">
{t('myAccounts')} {t('myAccounts')}
<button <Button
className="account-menu__lock-button" className="account-menu__lock-button"
onClick={() => { onClick={() => {
lockMetamask(); lockMetamask();
@ -332,7 +333,7 @@ export default class AccountMenu extends Component {
}} }}
> >
{t('lock')} {t('lock')}
</button> </Button>
</AccountMenuItem> </AccountMenuItem>
<div className="account-menu__divider" /> <div className="account-menu__divider" />
<div className="account-menu__accounts-container"> <div className="account-menu__accounts-container">

@ -3,6 +3,7 @@ import sinon from 'sinon';
import configureMockStore from 'redux-mock-store'; import configureMockStore from 'redux-mock-store';
import { Provider } from 'react-redux'; import { Provider } from 'react-redux';
import { mountWithRouter } from '../../../../test/lib/render-helpers'; import { mountWithRouter } from '../../../../test/lib/render-helpers';
import Button from '../../ui/button';
import AccountMenu from '.'; import AccountMenu from '.';
describe('Account Menu', () => { describe('Account Menu', () => {
@ -103,7 +104,7 @@ describe('Account Menu', () => {
let logout; let logout;
it('logout', () => { it('logout', () => {
logout = wrapper.find('.account-menu__lock-button'); logout = wrapper.find(Button);
expect(logout).toHaveLength(1); expect(logout).toHaveLength(1);
}); });

@ -97,14 +97,14 @@
align-items: center; align-items: center;
} }
&__lock-button { & &__lock-button {
@include H7; @include H7;
border: 1px solid $dusty-gray; border: 1px solid $ui-white;
background-color: transparent; background-color: transparent;
color: $white; color: $white;
border-radius: 4px;
padding: 3.5px 24px; padding: 3.5px 24px;
width: 59px;
} }
&__item-icon { &__item-icon {

@ -37,7 +37,6 @@
& &-button { & &-button {
height: 40px; height: 40px;
width: 50%; width: 50%;
border-radius: 100px;
margin-right: 24px; margin-right: 24px;
&:last-of-type { &:last-of-type {

@ -76,7 +76,6 @@ const UnconnectedAccountAlert = () => {
disabled={alertState === LOADING} disabled={alertState === LOADING}
onClick={onClose} onClick={onClose}
type="primary" type="primary"
rounded
className="unconnected-account-alert__dismiss-button" className="unconnected-account-alert__dismiss-button"
> >
{t('dismiss')} {t('dismiss')}

@ -22,7 +22,6 @@
height: 40px; height: 40px;
width: 100px; width: 100px;
border: 0; border: 0;
border-radius: 100px;
} }
&__error { &__error {

@ -46,3 +46,4 @@
@import 'transaction-total-banner/index'; @import 'transaction-total-banner/index';
@import 'wallet-overview/index'; @import 'wallet-overview/index';
@import 'whats-new-popup/index'; @import 'whats-new-popup/index';
@import 'loading-network-screen/index'

@ -33,11 +33,10 @@ export default function CancelButton({
const btn = ( const btn = (
<Button <Button
onClick={cancelTransaction} onClick={cancelTransaction}
rounded={!detailsModal} type="secondary"
type={detailsModal ? 'raised' : null}
className={classnames({ className={classnames({
'transaction-list-item__header-button': !detailsModal, 'transaction-list-item__header-button': !detailsModal,
'transaction-list-item-details__header-button': detailsModal, 'transaction-list-item-details__header-button-rounded-button': detailsModal,
})} })}
disabled={!hasEnoughCancelGas} disabled={!hasEnoughCancelGas}
> >

@ -122,7 +122,6 @@ export default class ConfirmPageContainerContent extends Component {
cancelText={cancelText} cancelText={cancelText}
onSubmit={onSubmit} onSubmit={onSubmit}
submitText={submitText} submitText={submitText}
submitButtonType="confirm"
disabled={disabled} disabled={disabled}
> >
{unapprovedTxCount > 1 && <a onClick={onCancelAll}>{rejectNText}</a>} {unapprovedTxCount > 1 && <a onClick={onCancelAll}>{rejectNText}</a>}

@ -198,7 +198,6 @@ export default class ConfirmPageContainer extends Component {
cancelText={this.context.t('reject')} cancelText={this.context.t('reject')}
onSubmit={onSubmit} onSubmit={onSubmit}
submitText={this.context.t('confirm')} submitText={this.context.t('confirm')}
submitButtonType="confirm"
disabled={disabled} disabled={disabled}
> >
{unapprovedTxCount > 1 && ( {unapprovedTxCount > 1 && (

@ -71,7 +71,6 @@
& &__ignore-button { & &__ignore-button {
border-color: #6a737d; border-color: #6a737d;
box-sizing: border-box; box-sizing: border-box;
border-radius: 6px;
color: $white; color: $white;
background-color: inherit; background-color: inherit;
height: 34px; height: 34px;
@ -95,7 +94,6 @@
& &__accept-button { & &__accept-button {
border-color: #6a737d; border-color: #6a737d;
box-sizing: border-box; box-sizing: border-box;
border-radius: 6px;
color: $white; color: $white;
background-color: inherit; background-color: inherit;
height: 34px; height: 34px;

@ -0,0 +1,6 @@
.loading-overlay__error-buttons {
button {
margin: 5px;
padding: 5px 30px;
}
}

@ -71,7 +71,7 @@ export default class LoadingNetworkScreen extends PureComponent {
<span>{this.context.t('somethingWentWrong')}</span> <span>{this.context.t('somethingWentWrong')}</span>
<div className="loading-overlay__error-buttons"> <div className="loading-overlay__error-buttons">
<Button <Button
type="default" type="secondary"
onClick={() => { onClick={() => {
window.clearTimeout(this.cancelCallTimeout); window.clearTimeout(this.cancelCallTimeout);
showNetworkDropdown(); showNetworkDropdown();

@ -61,7 +61,6 @@ const SECTIONS = {
children: 'Cancel', children: 'Cancel',
key: 'cancel-button', key: 'cancel-button',
props: { props: {
rounded: true,
type: 'outlined', type: 'outlined',
style: { style: {
width: '45%', width: '45%',
@ -73,7 +72,6 @@ const SECTIONS = {
children: 'OK', children: 'OK',
key: 'ok-button', key: 'ok-button',
props: { props: {
rounded: true,
type: 'primary', type: 'primary',
style: { style: {
width: '45%', width: '45%',

@ -21,13 +21,11 @@ export default class Modal extends PureComponent {
onCancel: PropTypes.func, onCancel: PropTypes.func,
cancelType: PropTypes.string, cancelType: PropTypes.string,
cancelText: PropTypes.string, cancelText: PropTypes.string,
rounded: PropTypes.bool,
}; };
static defaultProps = { static defaultProps = {
submitType: 'secondary', submitType: 'primary',
cancelType: 'default', cancelType: 'secondary',
rounded: false,
}; };
render() { render() {
@ -45,7 +43,6 @@ export default class Modal extends PureComponent {
contentClass, contentClass,
containerClass, containerClass,
hideFooter, hideFooter,
rounded,
} = this.props; } = this.props;
return ( return (
@ -64,7 +61,6 @@ export default class Modal extends PureComponent {
{onCancel && ( {onCancel && (
<Button <Button
type={cancelType} type={cancelType}
rounded={rounded}
onClick={onCancel} onClick={onCancel}
className="modal-container__footer-button" className="modal-container__footer-button"
> >
@ -73,7 +69,6 @@ export default class Modal extends PureComponent {
)} )}
<Button <Button
type={submitType} type={submitType}
rounded={rounded || false}
onClick={onSubmit} onClick={onSubmit}
disabled={submitDisabled} disabled={submitDisabled}
className="modal-container__footer-button" className="modal-container__footer-button"

@ -11,7 +11,7 @@ describe('Modal Component', () => {
expect(wrapper.find('.modal-container')).toHaveLength(1); expect(wrapper.find('.modal-container')).toHaveLength(1);
const buttons = wrapper.find(Button); const buttons = wrapper.find(Button);
expect(buttons).toHaveLength(1); expect(buttons).toHaveLength(1);
expect(buttons.at(0).props().type).toStrictEqual('secondary'); expect(buttons.at(0).props().type).toStrictEqual('primary');
}); });
it('should render a modal with a cancel and a submit button', () => { it('should render a modal with a cancel and a submit button', () => {
@ -31,13 +31,13 @@ describe('Modal Component', () => {
const cancelButton = buttons.at(0); const cancelButton = buttons.at(0);
const submitButton = buttons.at(1); const submitButton = buttons.at(1);
expect(cancelButton.props().type).toStrictEqual('default'); expect(cancelButton.props().type).toStrictEqual('secondary');
expect(cancelButton.props().children).toStrictEqual('Cancel'); expect(cancelButton.props().children).toStrictEqual('Cancel');
expect(handleCancel.callCount).toStrictEqual(0); expect(handleCancel.callCount).toStrictEqual(0);
cancelButton.simulate('click'); cancelButton.simulate('click');
expect(handleCancel.callCount).toStrictEqual(1); expect(handleCancel.callCount).toStrictEqual(1);
expect(submitButton.props().type).toStrictEqual('secondary'); expect(submitButton.props().type).toStrictEqual('primary');
expect(submitButton.props().children).toStrictEqual('Submit'); expect(submitButton.props().children).toStrictEqual('Submit');
expect(handleSubmit.callCount).toStrictEqual(0); expect(handleSubmit.callCount).toStrictEqual(0);
submitButton.simulate('click'); submitButton.simulate('click');
@ -49,7 +49,7 @@ describe('Modal Component', () => {
<Modal <Modal
onCancel={() => undefined} onCancel={() => undefined}
cancelText="Cancel" cancelText="Cancel"
cancelType="secondary" cancelType="default"
onSubmit={() => undefined} onSubmit={() => undefined}
submitText="Submit" submitText="Submit"
submitType="confirm" submitType="confirm"
@ -58,7 +58,7 @@ describe('Modal Component', () => {
const buttons = wrapper.find(Button); const buttons = wrapper.find(Button);
expect(buttons).toHaveLength(2); expect(buttons).toHaveLength(2);
expect(buttons.at(0).props().type).toStrictEqual('secondary'); expect(buttons.at(0).props().type).toStrictEqual('default');
expect(buttons.at(1).props().type).toStrictEqual('confirm'); expect(buttons.at(1).props().type).toStrictEqual('confirm');
}); });

@ -55,7 +55,6 @@ export default class CancelTransaction extends PureComponent {
onCancel={this.handleCancel} onCancel={this.handleCancel}
submitText={t('yesLetsTry')} submitText={t('yesLetsTry')}
cancelText={t('nevermind')} cancelText={t('nevermind')}
submitType="secondary"
submitDisabled={busy} submitDisabled={busy}
> >
<div> <div>

@ -30,7 +30,7 @@ export default class ConfirmDeleteNetwork extends PureComponent {
onCancel={() => this.props.hideModal()} onCancel={() => this.props.hideModal()}
submitText={t('delete')} submitText={t('delete')}
cancelText={t('cancel')} cancelText={t('cancel')}
submitType="danger" submitType="danger-primary"
> >
<ModalContent <ModalContent
title={t('deleteNetwork')} title={t('deleteNetwork')}

@ -34,7 +34,7 @@ describe('Confirm Delete Network', () => {
it('clicks cancel to hide modal', () => { it('clicks cancel to hide modal', () => {
const cancelButton = wrapper.find( const cancelButton = wrapper.find(
'.button.btn-default.modal-container__footer-button', '.button.btn-secondary.modal-container__footer-button',
); );
cancelButton.simulate('click'); cancelButton.simulate('click');
@ -43,7 +43,7 @@ describe('Confirm Delete Network', () => {
it('clicks delete to delete the target and hides modal', async () => { it('clicks delete to delete the target and hides modal', async () => {
const deleteButton = wrapper.find( const deleteButton = wrapper.find(
'.button.btn-danger.modal-container__footer-button', '.button.btn-danger-primary.modal-container__footer-button',
); );
deleteButton.simulate('click'); deleteButton.simulate('click');

@ -95,7 +95,6 @@ export default class ConfirmRemoveAccount extends Component {
onCancel={this.handleCancel} onCancel={this.handleCancel}
submitText={t('remove')} submitText={t('remove')}
cancelText={t('nevermind')} cancelText={t('nevermind')}
submitType="secondary"
> >
<div> <div>
{this.renderSelectedAccount()} {this.renderSelectedAccount()}

@ -51,14 +51,14 @@ describe('Confirm Remove Account', () => {
}); });
it('nevermind', () => { it('nevermind', () => {
const nevermind = wrapper.find({ type: 'default' }); const nevermind = wrapper.find({ type: 'secondary' });
nevermind.simulate('click'); nevermind.simulate('click');
expect(props.hideModal.calledOnce).toStrictEqual(true); expect(props.hideModal.calledOnce).toStrictEqual(true);
}); });
it('remove', async () => { it('remove', async () => {
const remove = wrapper.find({ type: 'secondary' }); const remove = wrapper.find({ type: 'primary' });
remove.simulate('click'); remove.simulate('click');
expect(await props.removeAccount.calledOnce).toStrictEqual(true); expect(await props.removeAccount.calledOnce).toStrictEqual(true);

@ -25,7 +25,7 @@ export default class ConfirmResetAccount extends PureComponent {
onCancel={() => this.props.hideModal()} onCancel={() => this.props.hideModal()}
submitText={t('reset')} submitText={t('reset')}
cancelText={t('nevermind')} cancelText={t('nevermind')}
submitType="danger" submitType="danger-primary"
> >
<ModalContent <ModalContent
title={`${t('resetAccount')}?`} title={`${t('resetAccount')}?`}

@ -25,7 +25,7 @@ describe('Confirm Reset Account', () => {
it('hides modal when nevermind button is clicked', () => { it('hides modal when nevermind button is clicked', () => {
const nevermind = wrapper.find( const nevermind = wrapper.find(
'.btn-default.modal-container__footer-button', '.btn-secondary.modal-container__footer-button',
); );
nevermind.simulate('click'); nevermind.simulate('click');
@ -33,7 +33,9 @@ describe('Confirm Reset Account', () => {
}); });
it('resets account and hides modal when reset button is clicked', async () => { it('resets account and hides modal when reset button is clicked', async () => {
const reset = wrapper.find('.btn-danger.modal-container__footer-button'); const reset = wrapper.find(
'.btn-danger-primary.modal-container__footer-button',
);
reset.simulate('click'); reset.simulate('click');
expect(await props.resetAccount.calledOnce).toStrictEqual(true); expect(await props.resetAccount.calledOnce).toStrictEqual(true);

@ -37,11 +37,8 @@ const CustomizeNonce = ({
hideModal(); hideModal();
}} }}
submitText={t('save')} submitText={t('save')}
submitType="primary"
onCancel={() => hideModal()} onCancel={() => hideModal()}
cancelText={t('cancel')} cancelText={t('cancel')}
cancelType="secondary"
rounded
contentClass="customize-nonce-modal-content" contentClass="customize-nonce-modal-content"
containerClass="customize-nonce-modal-container" containerClass="customize-nonce-modal-container"
> >

@ -226,7 +226,6 @@ export default class EditApprovalPermission extends PureComponent {
hideModal(); hideModal();
}} }}
submitText={t('save')} submitText={t('save')}
submitType="primary"
contentClass="edit-approval-permission-modal-content" contentClass="edit-approval-permission-modal-content"
containerClass="edit-approval-permission-modal-container" containerClass="edit-approval-permission-modal-container"
submitDisabled={disabled} submitDisabled={disabled}

@ -93,7 +93,7 @@ export default class ExportPrivateKeyModal extends Component {
<div className="export-private-key-modal__buttons"> <div className="export-private-key-modal__buttons">
{!privateKey && ( {!privateKey && (
<Button <Button
type="default" type="secondary"
large large
className="export-private-key-modal__button export-private-key-modal__button--cancel" className="export-private-key-modal__button export-private-key-modal__button--cancel"
onClick={() => hideModal()} onClick={() => hideModal()}
@ -104,7 +104,7 @@ export default class ExportPrivateKeyModal extends Component {
{privateKey ? ( {privateKey ? (
<Button <Button
onClick={() => hideModal()} onClick={() => hideModal()}
type="secondary" type="primary"
large large
className="export-private-key-modal__button" className="export-private-key-modal__button"
> >
@ -115,7 +115,7 @@ export default class ExportPrivateKeyModal extends Component {
onClick={() => onClick={() =>
this.exportAccountAndGetPrivateKey(this.state.password, address) this.exportAccountAndGetPrivateKey(this.state.password, address)
} }
type="secondary" type="primary"
large large
className="export-private-key-modal__button" className="export-private-key-modal__button"
disabled={!this.state.password} disabled={!this.state.password}

@ -61,7 +61,7 @@ class HideTokenConfirmationModal extends Component {
</div> </div>
<div className="hide-token-confirmation__buttons"> <div className="hide-token-confirmation__buttons">
<Button <Button
type="default" type="secondary"
className="hide-token-confirmation__button" className="hide-token-confirmation__button"
data-testid="hide-token-confirmation__cancel" data-testid="hide-token-confirmation__cancel"
onClick={() => hideModal()} onClick={() => hideModal()}
@ -69,7 +69,7 @@ class HideTokenConfirmationModal extends Component {
{this.context.t('cancel')} {this.context.t('cancel')}
</Button> </Button>
<Button <Button
type="secondary" type="primary"
className="hide-token-confirmation__button" className="hide-token-confirmation__button"
data-testid="hide-token-confirmation__hide" data-testid="hide-token-confirmation__hide"
onClick={() => hideToken(address)} onClick={() => hideToken(address)}

@ -140,7 +140,6 @@ export default class MetaMetricsOptInModal extends Component {
}); });
}} }}
submitText={t('affirmAgree')} submitText={t('affirmAgree')}
submitButtonType="confirm"
disabled={false} disabled={false}
/> />
</div> </div>

@ -28,7 +28,9 @@ describe('MetaMetrics Opt In', () => {
}); });
it('passes false to setParticipateInMetaMetrics and hides modal', async () => { it('passes false to setParticipateInMetaMetrics and hides modal', async () => {
const noThanks = wrapper.find('.btn-default.page-container__footer-button'); const noThanks = wrapper.find(
'.btn-secondary.page-container__footer-button',
);
noThanks.simulate('click'); noThanks.simulate('click');
expect(await props.setParticipateInMetaMetrics.calledOnce).toStrictEqual( expect(await props.setParticipateInMetaMetrics.calledOnce).toStrictEqual(

@ -221,7 +221,6 @@ export default class QrScanner extends Component {
onSubmit={this.tryAgain} onSubmit={this.tryAgain}
cancelText={t('cancel')} cancelText={t('cancel')}
submitText={t('tryAgain')} submitText={t('tryAgain')}
submitButtonType="confirm"
/> />
</> </>
); );

@ -32,7 +32,6 @@ export default class RejectTransactionsModal extends PureComponent {
onCancel={hideModal} onCancel={hideModal}
submitText={t('rejectAll')} submitText={t('rejectAll')}
cancelText={t('cancel')} cancelText={t('cancel')}
submitType="secondary"
> >
<div> <div>
<div className="reject-transactions__description"> <div className="reject-transactions__description">

@ -26,7 +26,7 @@ describe('Reject Transactions Model', () => {
it('hides modal when cancel button is clicked', () => { it('hides modal when cancel button is clicked', () => {
const cancelButton = wrapper.find( const cancelButton = wrapper.find(
'.btn-default.modal-container__footer-button', '.btn-secondary.modal-container__footer-button',
); );
cancelButton.simulate('click'); cancelButton.simulate('click');
@ -35,7 +35,7 @@ describe('Reject Transactions Model', () => {
it('onSubmit is called and hides modal when reject all clicked', async () => { it('onSubmit is called and hides modal when reject all clicked', async () => {
const rejectAllButton = wrapper.find( const rejectAllButton = wrapper.find(
'.btn-secondary.modal-container__footer-button', '.btn-primary.modal-container__footer-button',
); );
rejectAllButton.simulate('click'); rejectAllButton.simulate('click');

@ -17,9 +17,7 @@ describe('Transaction Confirmed', () => {
}, },
}, },
); );
const submit = wrapper.find( const submit = wrapper.find('.btn-primary.modal-container__footer-button');
'.btn-secondary.modal-container__footer-button',
);
submit.simulate('click'); submit.simulate('click');
expect(props.onSubmit.calledOnce).toStrictEqual(true); expect(props.onSubmit.calledOnce).toStrictEqual(true);

@ -141,7 +141,6 @@ export default class PermissionPageContainer extends Component {
cancelText={this.context.t('cancel')} cancelText={this.context.t('cancel')}
onSubmit={() => this.onSubmit()} onSubmit={() => this.onSubmit()}
submitText={this.context.t('connect')} submitText={this.context.t('connect')}
submitButtonType="confirm"
buttonSizeLarge={false} buttonSizeLarge={false}
/> />
</div> </div>

@ -75,7 +75,7 @@ export default function RecoveryPhraseReminder({ onConfirm, hasBackedUp }) {
</Box> </Box>
<Box justifyContent={JUSTIFY_CONTENT.CENTER}> <Box justifyContent={JUSTIFY_CONTENT.CENTER}>
<Box width={BLOCK_SIZES.TWO_FIFTHS}> <Box width={BLOCK_SIZES.TWO_FIFTHS}>
<Button rounded type="primary" onClick={onConfirm}> <Button type="primary" onClick={onConfirm}>
{t('recoveryPhraseReminderConfirm')} {t('recoveryPhraseReminderConfirm')}
</Button> </Button>
</Box> </Box>

@ -290,7 +290,7 @@ export default class SignatureRequestOriginal extends Component {
return ( return (
<div className="request-signature__footer"> <div className="request-signature__footer">
<Button <Button
type="default" type="secondary"
large large
className="request-signature__footer__cancel-button" className="request-signature__footer__cancel-button"
onClick={async (event) => { onClick={async (event) => {
@ -311,7 +311,7 @@ export default class SignatureRequestOriginal extends Component {
</Button> </Button>
<Button <Button
data-testid="request-signature__sign" data-testid="request-signature__sign"
type="secondary" type="primary"
large large
className="request-signature__footer__sign-button" className="request-signature__footer__sign-button"
onClick={async (event) => { onClick={async (event) => {

@ -6,7 +6,6 @@
text-transform: uppercase; text-transform: uppercase;
flex: 1; flex: 1;
margin: 1rem 0.5rem; margin: 1rem 0.5rem;
border-radius: 3px;
} }
button:first-child { button:first-child {

@ -16,7 +16,7 @@ export default class SignatureRequestFooter extends PureComponent {
const { cancelAction, signAction } = this.props; const { cancelAction, signAction } = this.props;
return ( return (
<div className="signature-request-footer"> <div className="signature-request-footer">
<Button onClick={cancelAction} type="default" large> <Button onClick={cancelAction} type="secondary" large>
{this.context.t('cancel')} {this.context.t('cancel')}
</Button> </Button>
<Button onClick={signAction} type="primary" large> <Button onClick={signAction} type="primary" large>

@ -64,7 +64,7 @@ describe('Signature Request', () => {
}); });
it('cancel', () => { it('cancel', () => {
const cancelButton = wrapper.find('button.btn-default'); const cancelButton = wrapper.find('button.btn-secondary');
cancelButton.simulate('click'); cancelButton.simulate('click');
expect(props.cancel.calledOnce).toStrictEqual(true); expect(props.cancel.calledOnce).toStrictEqual(true);

@ -17,7 +17,12 @@
} }
& &__header-button { & &__header-button {
@include H8; &-rounded-button {
@include H8;
padding: 0 16px;
margin-right: 8px;
}
&-tooltip-container { &-tooltip-container {
display: flex !important; display: flex !important;

@ -147,9 +147,9 @@ export default class TransactionListItemDetails extends PureComponent {
<div className="transaction-list-item-details__header-buttons"> <div className="transaction-list-item-details__header-buttons">
{showSpeedUp && ( {showSpeedUp && (
<Button <Button
type="raised" type="primary"
onClick={this.handleRetry} onClick={this.handleRetry}
className="transaction-list-item-details__header-button" className="transaction-list-item-details__header-button-rounded-button"
> >
{t('speedUp')} {t('speedUp')}
</Button> </Button>

@ -122,8 +122,7 @@ export default function TransactionListItem({
} }
return ( return (
<Button <Button
type="secondary" type="primary"
rounded
onClick={hasCancelled ? cancelTransaction : retryTransaction} onClick={hasCancelled ? cancelTransaction : retryTransaction}
style={hasCancelled ? { width: 'auto' } : null} style={hasCancelled ? { width: 'auto' } : null}
> >

@ -157,7 +157,6 @@ export default function TransactionList({
<Button <Button
className="transaction-list__view-more" className="transaction-list__view-more"
type="secondary" type="secondary"
rounded
onClick={viewMore} onClick={viewMore}
> >
{t('viewMore')} {t('viewMore')}

@ -103,7 +103,6 @@ const renderFirstNotification = (notification, idRefMap, history, isLast) => {
<Button <Button
type="secondary" type="secondary"
className="whats-new-popup__button" className="whats-new-popup__button"
rounded
onClick={actionFunction} onClick={actionFunction}
> >
{actionText} {actionText}

@ -31,7 +31,6 @@ const Button = ({
large, large,
children, children,
icon, icon,
rounded,
className, className,
...buttonProps ...buttonProps
}) => { }) => {
@ -40,8 +39,10 @@ const Button = ({
// we know to be erroneous attributes for a link. We will likely want to extract Link // we know to be erroneous attributes for a link. We will likely want to extract Link
// to its own component in the future. // to its own component in the future.
let Tag = 'button'; let Tag = 'button';
let rounded = true;
if (type === 'link') { if (type === 'link') {
Tag = 'a'; Tag = 'a';
rounded = false;
} else if (submit) { } else if (submit) {
buttonProps.type = 'submit'; buttonProps.type = 'submit';
} }
@ -58,9 +59,9 @@ const Button = ({
<Tag <Tag
className={classnames( className={classnames(
'button', 'button',
rounded && CLASSNAME_ROUNDED,
typeHash[type] || CLASSNAME_DEFAULT, typeHash[type] || CLASSNAME_DEFAULT,
large && CLASSNAME_LARGE, large && CLASSNAME_LARGE,
rounded && CLASSNAME_ROUNDED,
className, className,
)} )}
{...buttonProps} {...buttonProps}
@ -75,7 +76,6 @@ Button.propTypes = {
type: PropTypes.string, type: PropTypes.string,
submit: PropTypes.bool, submit: PropTypes.bool,
large: PropTypes.bool, large: PropTypes.bool,
rounded: PropTypes.bool,
className: PropTypes.string, className: PropTypes.string,
children: PropTypes.node, children: PropTypes.node,
icon: PropTypes.node, icon: PropTypes.node,

@ -44,7 +44,7 @@ export default class PageContainerFooter extends Component {
<footer> <footer>
{!hideCancel && ( {!hideCancel && (
<Button <Button
type={cancelButtonType || 'default'} type={cancelButtonType || 'secondary'}
large={buttonSizeLarge} large={buttonSizeLarge}
className={classnames( className={classnames(
'page-container__footer-button', 'page-container__footer-button',
@ -58,7 +58,7 @@ export default class PageContainerFooter extends Component {
)} )}
<Button <Button
type={submitButtonType || 'secondary'} type={submitButtonType || 'primary'}
large={buttonSizeLarge} large={buttonSizeLarge}
className={classnames( className={classnames(
'page-container__footer-button', 'page-container__footer-button',

@ -45,7 +45,7 @@ describe('Page Footer', () => {
it('has button type of default', () => { it('has button type of default', () => {
expect( expect(
wrapper.find('.page-container__footer-button').first().prop('type'), wrapper.find('.page-container__footer-button').first().prop('type'),
).toStrictEqual('default'); ).toStrictEqual('secondary');
}); });
it('has children text of Cancel', () => { it('has children text of Cancel', () => {

@ -143,7 +143,6 @@ export default class PageContainer extends PureComponent {
onSubmit={onSubmit} onSubmit={onSubmit}
submitText={tabSubmitText || submitText} submitText={tabSubmitText || submitText}
disabled={disabled} disabled={disabled}
submitButtonType="primary"
/> />
</div> </div>
</div> </div>

@ -49,7 +49,6 @@ export default function TruncatedDefinitionList({
<Button <Button
type="primary" type="primary"
style={{ width: '50%' }} style={{ width: '50%' }}
rounded
onClick={() => setIsPopoverOpen(false)} onClick={() => setIsPopoverOpen(false)}
> >
Close Close

@ -785,13 +785,14 @@
width: 56px; width: 56px;
height: 20px; height: 20px;
margin-top: 5px; margin-top: 5px;
border-radius: 100px;
&__button { &__button {
width: 56px; width: 56px;
height: 20px; height: 20px;
position: absolute; position: absolute;
border: 1px solid #b0d7f2; border: 1px solid #b0d7f2;
border-radius: 6px; border-radius: 100px;
cursor: pointer; cursor: pointer;
top: 0; top: 0;
left: 0; left: 0;

@ -125,7 +125,7 @@ export default class ConfirmAddSuggestedToken extends Component {
<div className="page-container__footer"> <div className="page-container__footer">
<footer> <footer>
<Button <Button
type="default" type="secondary"
large large
className="page-container__footer-button" className="page-container__footer-button"
onClick={async () => { onClick={async () => {
@ -138,7 +138,7 @@ export default class ConfirmAddSuggestedToken extends Component {
{this.context.t('cancel')} {this.context.t('cancel')}
</Button> </Button>
<Button <Button
type="secondary" type="primary"
large large
className="page-container__footer-button" className="page-container__footer-button"
disabled={suggestedAssets.length === 0} disabled={suggestedAssets.length === 0}

@ -296,7 +296,7 @@ export default class ConfirmDecryptMessage extends Component {
return ( return (
<div className="request-decrypt-message__footer"> <div className="request-decrypt-message__footer">
<Button <Button
type="default" type="secondary"
large large
className="request-decrypt-message__footer__cancel-button" className="request-decrypt-message__footer__cancel-button"
onClick={async (event) => { onClick={async (event) => {
@ -316,7 +316,7 @@ export default class ConfirmDecryptMessage extends Component {
{t('cancel')} {t('cancel')}
</Button> </Button>
<Button <Button
type="secondary" type="primary"
large large
className="request-decrypt-message__footer__sign-button" className="request-decrypt-message__footer__sign-button"
onClick={async (event) => { onClick={async (event) => {

@ -199,7 +199,7 @@ export default class ConfirmEncryptionPublicKey extends Component {
return ( return (
<div className="request-encryption-public-key__footer"> <div className="request-encryption-public-key__footer">
<Button <Button
type="default" type="secondary"
large large
className="request-encryption-public-key__footer__cancel-button" className="request-encryption-public-key__footer__cancel-button"
onClick={async (event) => { onClick={async (event) => {
@ -219,7 +219,7 @@ export default class ConfirmEncryptionPublicKey extends Component {
{this.context.t('cancel')} {this.context.t('cancel')}
</Button> </Button>
<Button <Button
type="secondary" type="primary"
large large
className="request-encryption-public-key__footer__sign-button" className="request-encryption-public-key__footer__sign-button"
onClick={async (event) => { onClick={async (event) => {

@ -94,7 +94,7 @@ export default class ConfirmImportToken extends Component {
<div className="page-container__footer"> <div className="page-container__footer">
<footer> <footer>
<Button <Button
type="default" type="secondary"
large large
className="page-container__footer-button" className="page-container__footer-button"
onClick={() => history.push(IMPORT_TOKEN_ROUTE)} onClick={() => history.push(IMPORT_TOKEN_ROUTE)}
@ -102,7 +102,7 @@ export default class ConfirmImportToken extends Component {
{this.context.t('back')} {this.context.t('back')}
</Button> </Button>
<Button <Button
type="secondary" type="primary"
large large
className="page-container__footer-button" className="page-container__footer-button"
onClick={() => { onClick={() => {

@ -13,10 +13,10 @@ export default function ConfirmationFooter({
<div className="confirmation-footer"> <div className="confirmation-footer">
{alerts} {alerts}
<div className="confirmation-footer__actions"> <div className="confirmation-footer__actions">
<Button rounded type="secondary" onClick={onCancel}> <Button type="secondary" onClick={onCancel}>
{cancelText} {cancelText}
</Button> </Button>
<Button rounded type="primary" onClick={onApprove}> <Button type="primary" onClick={onApprove}>
{approveText} {approveText}
</Button> </Button>
</div> </div>

@ -194,7 +194,7 @@ class AccountList extends Component {
return ( return (
<div className="new-external-account-form__buttons"> <div className="new-external-account-form__buttons">
<Button <Button
type="default" type="secondary"
large large
className="new-external-account-form__button" className="new-external-account-form__button"
onClick={this.props.onCancel.bind(this)} onClick={this.props.onCancel.bind(this)}

@ -57,7 +57,7 @@ class JsonImportSubview extends Component {
/> />
<div className="new-account-create-form__buttons"> <div className="new-account-create-form__buttons">
<Button <Button
type="default" type="secondary"
large large
className="new-account-create-form__button" className="new-account-create-form__button"
onClick={() => history.push(mostRecentOverviewPage)} onClick={() => history.push(mostRecentOverviewPage)}
@ -65,7 +65,7 @@ class JsonImportSubview extends Component {
{this.context.t('cancel')} {this.context.t('cancel')}
</Button> </Button>
<Button <Button
type="secondary" type="primary"
large large
className="new-account-create-form__button" className="new-account-create-form__button"
onClick={() => this.createNewKeychain()} onClick={() => this.createNewKeychain()}

@ -104,7 +104,7 @@ class PrivateKeyImportView extends Component {
</div> </div>
<div className="new-account-import-form__buttons"> <div className="new-account-import-form__buttons">
<Button <Button
type="default" type="secondary"
large large
className="new-account-create-form__button" className="new-account-create-form__button"
onClick={() => { onClick={() => {
@ -116,7 +116,7 @@ class PrivateKeyImportView extends Component {
{this.context.t('cancel')} {this.context.t('cancel')}
</Button> </Button>
<Button <Button
type="secondary" type="primary"
large large
className="new-account-create-form__button" className="new-account-create-form__button"
onClick={() => this.createNewKeychain()} onClick={() => this.createNewKeychain()}

@ -60,7 +60,7 @@ export default class NewAccountCreateForm extends Component {
/> />
<div className="new-account-create-form__buttons"> <div className="new-account-create-form__buttons">
<Button <Button
type="default" type="secondary"
large large
className="new-account-create-form__button" className="new-account-create-form__button"
onClick={() => history.push(mostRecentOverviewPage)} onClick={() => history.push(mostRecentOverviewPage)}
@ -68,7 +68,7 @@ export default class NewAccountCreateForm extends Component {
{this.context.t('cancel')} {this.context.t('cancel')}
</Button> </Button>
<Button <Button
type="secondary" type="primary"
large large
className="new-account-create-form__button" className="new-account-create-form__button"
onClick={createClick} onClick={createClick}

@ -166,7 +166,6 @@ export default class MetaMetricsOptIn extends Component {
} }
}} }}
submitText={t('affirmAgree')} submitText={t('affirmAgree')}
submitButtonType="primary"
disabled={false} disabled={false}
/> />
<div className="metametrics-opt-in__bottom-text"> <div className="metametrics-opt-in__bottom-text">

@ -21,7 +21,7 @@ describe('MetaMetricsOptIn', () => {
store, store,
); );
const noThanksButton = wrapper.find( const noThanksButton = wrapper.find(
'.btn-default.page-container__footer-button', '.btn-secondary.page-container__footer-button',
); );
noThanksButton.simulate('click'); noThanksButton.simulate('click');

@ -185,3 +185,8 @@
padding-top: 5px; padding-top: 5px;
} }
} }
.page-container__footer-single-button {
width: 40%;
margin: 8px auto;
}

@ -239,7 +239,7 @@ class RestoreVaultPage extends Component {
largeLabel largeLabel
/> />
<Button <Button
type="first-time" type="primary"
className="first-time-flow__button" className="first-time-flow__button"
onClick={() => !disabled && this.onClick()} onClick={() => !disabled && this.onClick()}
disabled={disabled} disabled={disabled}

@ -114,7 +114,7 @@ class RevealSeedPage extends Component {
<div className="page-container__footer"> <div className="page-container__footer">
<footer> <footer>
<Button <Button
type="default" type="secondary"
large large
className="page-container__footer-button" className="page-container__footer-button"
onClick={() => onClick={() =>
@ -124,7 +124,7 @@ class RevealSeedPage extends Component {
{this.context.t('cancel')} {this.context.t('cancel')}
</Button> </Button>
<Button <Button
type="secondary" type="primary"
large large
className="page-container__footer-button" className="page-container__footer-button"
onClick={(event) => this.handleSubmit(event)} onClick={(event) => this.handleSubmit(event)}
@ -141,9 +141,9 @@ class RevealSeedPage extends Component {
return ( return (
<div className="page-container__footer"> <div className="page-container__footer">
<Button <Button
type="default" type="secondary"
large large
className="page-container__footer-button" className="page-container__footer-single-button"
onClick={() => onClick={() =>
this.props.history.push(this.props.mostRecentOverviewPage) this.props.history.push(this.props.mostRecentOverviewPage)
} }

@ -408,10 +408,10 @@ export default class MobileSyncPage extends Component {
return ( return (
<div <div
className="new-account-import-form__buttons" className="new-account-import-form__buttons"
style={{ padding: 30, marginTop: 0 }} style={{ padding: '30px 15px 30px 15px', marginTop: 0 }}
> >
<Button <Button
type="default" type="secondary"
large large
className="new-account-create-form__button" className="new-account-create-form__button"
onClick={() => this.goBack()} onClick={() => this.goBack()}
@ -419,7 +419,7 @@ export default class MobileSyncPage extends Component {
{t('cancel')} {t('cancel')}
</Button> </Button>
<Button <Button
type="secondary" type="primary"
large large
className="new-account-create-form__button" className="new-account-create-form__button"
onClick={(event) => this.handleSubmit(event)} onClick={(event) => this.handleSubmit(event)}
@ -437,7 +437,7 @@ export default class MobileSyncPage extends Component {
return ( return (
<div className="page-container__footer" style={{ padding: 30 }}> <div className="page-container__footer" style={{ padding: 30 }}>
<Button <Button
type="default" type="secondary"
large large
className="page-container__footer-button" className="page-container__footer-button"
onClick={() => this.goBack()} onClick={() => this.goBack()}

@ -169,7 +169,6 @@ export default function NewAccount({ onSubmit }) {
className="new-account__form--submit-button" className="new-account__form--submit-button"
disabled={!isValid || !termsChecked} disabled={!isValid || !termsChecked}
onClick={handleCreate} onClick={handleCreate}
rounded
> >
{t('createNewWallet')} {t('createNewWallet')}
</Button> </Button>

@ -80,7 +80,6 @@ export default function ConfirmRecoveryPhrase({ seedPhrase = '' }) {
/> />
<div className="recovery-phrase__footer"> <div className="recovery-phrase__footer">
<Button <Button
rounded
type="primary" type="primary"
className="recovery-phrase__footer--button" className="recovery-phrase__footer--button"
onClick={() => { onClick={() => {

@ -92,7 +92,6 @@ export default function RecoveryPhrase({ seedPhrase }) {
{copied ? t('copiedExclamation') : t('copyToClipboard')} {copied ? t('copiedExclamation') : t('copyToClipboard')}
</Button> </Button>
<Button <Button
rounded
type="primary" type="primary"
className="recovery-phrase__footer--button" className="recovery-phrase__footer--button"
onClick={() => { onClick={() => {
@ -104,7 +103,6 @@ export default function RecoveryPhrase({ seedPhrase }) {
</div> </div>
) : ( ) : (
<Button <Button
rounded
type="primary" type="primary"
className="recovery-phrase__footer--button" className="recovery-phrase__footer--button"
onClick={() => { onClick={() => {

@ -224,7 +224,7 @@ export default class ChooseAccount extends Component {
<div className="permissions-connect-choose-account__bottom-buttons"> <div className="permissions-connect-choose-account__bottom-buttons">
<Button <Button
onClick={() => cancelPermissionsRequest(permissionsRequestId)} onClick={() => cancelPermissionsRequest(permissionsRequestId)}
type="default" type="secondary"
> >
{t('cancel')} {t('cancel')}
</Button> </Button>

@ -179,7 +179,7 @@
width: 124px; width: 124px;
} }
.btn-default { .btn-secondary {
background: white; background: white;
margin-left: 16px; margin-left: 16px;
} }

@ -74,7 +74,6 @@ export const PermissionPageContainerComponent = () => {
cancelButtonType="default" cancelButtonType="default"
onSubmit={action('Account(s) Connected')} onSubmit={action('Account(s) Connected')}
submitText="connect" submitText="connect"
submitButtonType="confirm"
buttonSizeLarge={false} buttonSizeLarge={false}
/> />
</div> </div>

@ -153,7 +153,6 @@ export default class AddContact extends PureComponent {
history.push(CONTACT_LIST_ROUTE); history.push(CONTACT_LIST_ROUTE);
}} }}
submitText={this.context.t('save')} submitText={this.context.t('save')}
submitButtonType="confirm"
/> />
</div> </div>
); );

@ -80,7 +80,6 @@ export default class ContactListTab extends Component {
viewingContact || editingContact, viewingContact || editingContact,
})} })}
type="secondary" type="secondary"
rounded
onClick={() => { onClick={() => {
history.push(CONTACT_ADD_ROUTE); history.push(CONTACT_ADD_ROUTE);
}} }}

@ -177,7 +177,6 @@ export default class EditContact extends PureComponent {
history.push(`${viewRoute}/${address}`); history.push(`${viewRoute}/${address}`);
}} }}
submitText={this.context.t('save')} submitText={this.context.t('save')}
submitButtonType="confirm"
/> />
</div> </div>
); );

@ -257,7 +257,6 @@
top: 85px; top: 85px;
right: 16px; right: 16px;
width: auto; width: auto;
border-radius: 100px;
@media screen and (max-width: $break-small) { @media screen and (max-width: $break-small) {
top: 16px; top: 16px;

@ -232,11 +232,11 @@
width: 93%; width: 93%;
} }
.btn-default { .btn-secondary {
margin-right: 0.375rem; margin-right: 0.375rem;
} }
.btn-secondary { .btn-primary {
margin-left: 0.375rem; margin-left: 0.375rem;
} }

@ -629,14 +629,14 @@ export default class NetworkForm extends PureComponent {
</Button> </Button>
)} )}
<Button <Button
type="default" type="secondary"
onClick={this.onCancel} onClick={this.onCancel}
disabled={this.stateIsUnchanged()} disabled={this.stateIsUnchanged()}
> >
{t('cancel')} {t('cancel')}
</Button> </Button>
<Button <Button
type="secondary" type="primary"
disabled={isSubmitDisabled} disabled={isSubmitDisabled}
onClick={this.onSubmit} onClick={this.onSubmit}
> >

@ -56,7 +56,7 @@ export default class NetworksTab extends PureComponent {
</span> </span>
<div className="networks-tab__add-network-header-button-wrapper"> <div className="networks-tab__add-network-header-button-wrapper">
<Button <Button
type="secondary" type="primary"
onClick={(event) => { onClick={(event) => {
event.preventDefault(); event.preventDefault();
setSelectedSettingsRpcUrl(''); setSelectedSettingsRpcUrl('');

@ -27,15 +27,13 @@ export default function ImportToken({
type="secondary" type="secondary"
className="page-container__footer-button" className="page-container__footer-button"
onClick={onImportTokenCloseClick} onClick={onImportTokenCloseClick}
rounded
> >
{t('cancel')} {t('cancel')}
</Button> </Button>
<Button <Button
type="confirm" type="primary"
className="page-container__footer-button" className="page-container__footer-button"
onClick={onImportTokenClick} onClick={onImportTokenClick}
rounded
> >
{t('import')} {t('import')}
</Button> </Button>

@ -139,7 +139,7 @@ export default function ItemList({
)} )}
</div> </div>
{result.notImported && ( {result.notImported && (
<Button type="confirm" onClick={onClick} rounded> <Button type="confirm" onClick={onClick}>
{t('import')} {t('import')}
</Button> </Button>
)} )}

@ -2,7 +2,6 @@
.select-quote-popover { .select-quote-popover {
&__button { &__button {
border-radius: 100px;
height: 39px; height: 39px;
width: 140px; width: 140px;
} }

@ -57,7 +57,7 @@ const SelectQuotePopover = ({
const footer = ( const footer = (
<> <>
<Button <Button
type="default" type="secondary"
className="page-container__footer-button select-quote-popover__button" className="page-container__footer-button select-quote-popover__button"
onClick={onClose} onClick={onClose}
> >
@ -65,7 +65,7 @@ const SelectQuotePopover = ({
</Button> </Button>
<Button <Button
type="confirm" type="primary"
className="page-container__footer-button select-quote-popover__button" className="page-container__footer-button select-quote-popover__button"
onClick={onSubmitClick} onClick={onSubmitClick}
> >

@ -13,7 +13,7 @@ exports[`SwapsFooter renders the component with initial props 1`] = `
> >
<footer> <footer>
<button <button
class="button btn-default page-container__footer-button swaps-footer__custom-page-container-footer-button-class" class="button btn--rounded btn-secondary page-container__footer-button swaps-footer__custom-page-container-footer-button-class"
data-testid="page-container-footer-cancel" data-testid="page-container-footer-cancel"
role="button" role="button"
tabindex="0" tabindex="0"
@ -21,7 +21,7 @@ exports[`SwapsFooter renders the component with initial props 1`] = `
Back Back
</button> </button>
<button <button
class="button btn-primary page-container__footer-button swaps-footer__custom-page-container-footer-button-class" class="button btn--rounded btn-primary page-container__footer-button swaps-footer__custom-page-container-footer-button-class"
data-testid="page-container-footer-next" data-testid="page-container-footer-next"
role="button" role="button"
tabindex="0" tabindex="0"

@ -30,7 +30,6 @@ export default function SwapsFooter({
cancelText={t('back')} cancelText={t('back')}
onSubmit={onSubmit} onSubmit={onSubmit}
submitText={submitText} submitText={submitText}
submitButtonType="confirm"
footerClassName={classnames( footerClassName={classnames(
'swaps-footer__custom-page-container-footer-class', 'swaps-footer__custom-page-container-footer-class',
className, className,

@ -41,6 +41,7 @@
button { button {
font-weight: bold; font-weight: bold;
border-radius: 100px;
} }
} }

@ -1,8 +1,8 @@
import { EventEmitter } from 'events'; import { EventEmitter } from 'events';
import React, { Component } from 'react'; import React, { Component } from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import Button from '@material-ui/core/Button';
import getCaretCoordinates from 'textarea-caret'; import getCaretCoordinates from 'textarea-caret';
import Button from '../../components/ui/button';
import TextField from '../../components/ui/text-field'; import TextField from '../../components/ui/text-field';
import Mascot from '../../components/ui/mascot'; import Mascot from '../../components/ui/mascot';
import { DEFAULT_ROUTE } from '../../helpers/constants/routes'; import { DEFAULT_ROUTE } from '../../helpers/constants/routes';
@ -115,7 +115,7 @@ export default class UnlockPage extends Component {
height: '60px', height: '60px',
fontWeight: '400', fontWeight: '400',
boxShadow: 'none', boxShadow: 'none',
borderRadius: '4px', borderRadius: '100px',
}; };
return ( return (

Loading…
Cancel
Save