From a6dbb3a7849881247270f0cf84d8b725f9022310 Mon Sep 17 00:00:00 2001 From: Sriram Viswanathan Date: Wed, 22 Mar 2017 18:03:10 -0300 Subject: |#973| Thais + Sriram | Adds name attribute to logout button and make it transparent on hover --- web-ui/src/common/flat_button/flat_button.js | 5 ++++- web-ui/src/common/flat_button/flat_button.spec.js | 6 +++++- web-ui/src/common/logout/logout.js | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) (limited to 'web-ui/src') diff --git a/web-ui/src/common/flat_button/flat_button.js b/web-ui/src/common/flat_button/flat_button.js index 8b65ca30..d9930ff5 100644 --- a/web-ui/src/common/flat_button/flat_button.js +++ b/web-ui/src/common/flat_button/flat_button.js @@ -34,10 +34,12 @@ const flatButtonStyle = { verticalAlign: 'top' }; -const SubmitFlatButton = ({ buttonText, fontIconClass }) => ( +const SubmitFlatButton = ({ name, buttonText, fontIconClass }) => ( ( ); SubmitFlatButton.propTypes = { + name: React.PropTypes.string.isRequired, buttonText: React.PropTypes.string.isRequired, fontIconClass: React.PropTypes.string.isRequired }; diff --git a/web-ui/src/common/flat_button/flat_button.spec.js b/web-ui/src/common/flat_button/flat_button.spec.js index 500eb8fb..8939e3d9 100644 --- a/web-ui/src/common/flat_button/flat_button.spec.js +++ b/web-ui/src/common/flat_button/flat_button.spec.js @@ -7,7 +7,11 @@ describe('FlatButton', () => { let flatButton; beforeEach(() => { - flatButton = shallow(); + flatButton = shallow(); + }); + + it('renders a FlatButton of type submit with name logout', () => { + expect(flatButton.find('FlatButton').props().name).toEqual('logout'); }); it('renders a FlatButton of type submit with text logout', () => { diff --git a/web-ui/src/common/logout/logout.js b/web-ui/src/common/logout/logout.js index 12db1067..c4c98b0c 100644 --- a/web-ui/src/common/logout/logout.js +++ b/web-ui/src/common/logout/logout.js @@ -34,7 +34,7 @@ export class Logout extends React.Component {
- +
); -- cgit v1.2.3