From 1635fca0ddf659f43ce5185b144cad215117c0c9 Mon Sep 17 00:00:00 2001 From: Sriram Viswanathan Date: Wed, 5 Apr 2017 14:16:52 -0300 Subject: [#938] Replaces RaisedButton with FlatButton for backup-account link with @anikarni --- web-ui/src/common/link_button/link_button.js | 32 +++++++---------------- web-ui/src/common/link_button/link_button.scss | 32 +++++++++++++++++++++-- web-ui/src/common/link_button/link_button.spec.js | 4 +-- 3 files changed, 42 insertions(+), 26 deletions(-) diff --git a/web-ui/src/common/link_button/link_button.js b/web-ui/src/common/link_button/link_button.js index 17391ce6..05e86a9f 100644 --- a/web-ui/src/common/link_button/link_button.js +++ b/web-ui/src/common/link_button/link_button.js @@ -16,42 +16,30 @@ */ import React from 'react'; -import RaisedButton from 'material-ui/RaisedButton'; +import FlatButton from 'material-ui/FlatButton'; -import '../submit_button/submit_button.scss'; import './link_button.scss'; const labelStyle = { textTransform: 'none', - fontSize: '1em', - lineHeight: '48px', - color: '#ff9c00' + color: 'inherit', + fontSize: 'inherit' }; -const buttonStyle = { - height: '48px', - backgroundColor: '#fff' -}; - -const overlayStyle = { - height: '48px' -}; - -const style = { - boxShadow: 'none' +const linkButtonStyle = { + color: 'inherit', + borderRadius: '0' }; const LinkButton = ({ buttonText, href }) => ( -
- +
); diff --git a/web-ui/src/common/link_button/link_button.scss b/web-ui/src/common/link_button/link_button.scss index ccea5523..3b4a534c 100644 --- a/web-ui/src/common/link_button/link_button.scss +++ b/web-ui/src/common/link_button/link_button.scss @@ -15,7 +15,35 @@ * along with Pixelated. If not, see . */ -.link-button > div { +@import "~scss/base/colors"; + +.link-button > a { + width: 100%; +} + +.link-button { + width: 100%; margin-top: 2em; - border: 2px solid #ff9c00; + border: 2px solid $light_orange; + border-radius: 2px; + font-size: 1em; + color: $light_orange; + &:hover { + color: $white; + } +} + +@media only screen and (min-width : 500px) { + .link-button { + width: 70%; + align-self: center; + } +} + +@media only screen and (min-width : 960px) { + .link-button { + width: 300px; + margin-bottom: 1em; + font-size: 0.8em; + } } diff --git a/web-ui/src/common/link_button/link_button.spec.js b/web-ui/src/common/link_button/link_button.spec.js index dd040d28..945afffe 100644 --- a/web-ui/src/common/link_button/link_button.spec.js +++ b/web-ui/src/common/link_button/link_button.spec.js @@ -11,10 +11,10 @@ describe('LinkButton', () => { }); it('renders link button with given button text', () => { - expect(linkButton.find('RaisedButton').props().label).toEqual('Go To Link'); + expect(linkButton.find('FlatButton').props().label).toEqual('Go To Link'); }); it('renders link button with given href', () => { - expect(linkButton.find('RaisedButton').props().href).toEqual('/some-link'); + expect(linkButton.find('FlatButton').props().href).toEqual('/some-link'); }); }); -- cgit v1.2.3