aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChi Kei Chan <chikeichan@gmail.com>2019-04-18 04:34:47 +0800
committerGitHub <noreply@github.com>2019-04-18 04:34:47 +0800
commitd8b536982e5e074f94400d19f89c615eefc92f74 (patch)
tree5b54a05a894a0419b47978bd49d8edd836e71e51
parent931aaeb7003f175374a06eb949cd47a12ebc8bbf (diff)
downloadtangerine-wallet-browser-d8b536982e5e074f94400d19f89c615eefc92f74.tar
tangerine-wallet-browser-d8b536982e5e074f94400d19f89c615eefc92f74.tar.gz
tangerine-wallet-browser-d8b536982e5e074f94400d19f89c615eefc92f74.tar.bz2
tangerine-wallet-browser-d8b536982e5e074f94400d19f89c615eefc92f74.tar.lz
tangerine-wallet-browser-d8b536982e5e074f94400d19f89c615eefc92f74.tar.xz
tangerine-wallet-browser-d8b536982e5e074f94400d19f89c615eefc92f74.tar.zst
tangerine-wallet-browser-d8b536982e5e074f94400d19f89c615eefc92f74.zip
Update confirm to use btn-primary (#6473)
* Update confirm to use btn-primary * Remove console * Fix e2e test
-rw-r--r--test/e2e/beta/metamask-beta-responsive-ui.spec.js2
-rw-r--r--ui/app/components/ui/button/button.component.js11
2 files changed, 7 insertions, 6 deletions
diff --git a/test/e2e/beta/metamask-beta-responsive-ui.spec.js b/test/e2e/beta/metamask-beta-responsive-ui.spec.js
index b1ed8536e..9ef560556 100644
--- a/test/e2e/beta/metamask-beta-responsive-ui.spec.js
+++ b/test/e2e/beta/metamask-beta-responsive-ui.spec.js
@@ -123,7 +123,7 @@ describe('MetaMask', function () {
})
it('clicks the "I agree" option on the metametrics opt-in screen', async () => {
- const optOutButton = await findElement(driver, By.css('.btn-confirm'))
+ const optOutButton = await findElement(driver, By.css('.btn-primary'))
optOutButton.click()
await delay(largeDelayMs)
})
diff --git a/ui/app/components/ui/button/button.component.js b/ui/app/components/ui/button/button.component.js
index 01d946927..39e81317c 100644
--- a/ui/app/components/ui/button/button.component.js
+++ b/ui/app/components/ui/button/button.component.js
@@ -5,7 +5,7 @@ import classnames from 'classnames'
const CLASSNAME_DEFAULT = 'btn-default'
const CLASSNAME_PRIMARY = 'btn-primary'
const CLASSNAME_SECONDARY = 'btn-secondary'
-const CLASSNAME_CONFIRM = 'btn-confirm'
+const CLASSNAME_CONFIRM = 'btn-primary'
const CLASSNAME_RAISED = 'btn-raised'
const CLASSNAME_LARGE = 'btn--large'
const CLASSNAME_FIRST_TIME = 'btn--first-time'
@@ -14,13 +14,14 @@ const typeHash = {
default: CLASSNAME_DEFAULT,
primary: CLASSNAME_PRIMARY,
secondary: CLASSNAME_SECONDARY,
- confirm: CLASSNAME_CONFIRM,
- raised: CLASSNAME_RAISED,
- 'first-time': CLASSNAME_FIRST_TIME,
warning: 'btn-warning',
danger: 'btn-danger',
'danger-primary': 'btn-danger-primary',
link: 'btn-link',
+ // TODO: Legacy button type to be deprecated
+ confirm: CLASSNAME_CONFIRM,
+ raised: CLASSNAME_RAISED,
+ 'first-time': CLASSNAME_FIRST_TIME,
}
export default class Button extends Component {
@@ -42,7 +43,7 @@ export default class Button extends Component {
<button
className={classnames(
'button',
- typeHash[type],
+ typeHash[type] || CLASSNAME_DEFAULT,
large && CLASSNAME_LARGE,
className
)}