From 5cfe146422e18aa7132938c971b6d8ed01a00b54 Mon Sep 17 00:00:00 2001 From: meriadec Date: Thu, 25 Jan 2018 13:51:56 +0100 Subject: [PATCH] Styling updates for settings --- .eslintrc | 1 + src/components/SettingsPage/Display.js | 10 +++-- src/components/SettingsPage/Profile.js | 35 +++++++++--------- src/components/base/Label.js | 7 +++- src/components/base/Modal/index.js | 5 ++- src/components/modals/AddAccount.js | 51 ++++++++++++++++---------- 6 files changed, 64 insertions(+), 45 deletions(-) diff --git a/.eslintrc b/.eslintrc index 1049b3ec..86f3e0cd 100644 --- a/.eslintrc +++ b/.eslintrc @@ -16,6 +16,7 @@ "import/prefer-default-export": 0, "import/no-named-as-default": 0, "jsx-a11y/anchor-is-valid": 0, + "jsx-a11y/label-has-for": 0, "new-cap": 0, "no-nested-ternary": 0, "no-param-reassign": 0, diff --git a/src/components/SettingsPage/Display.js b/src/components/SettingsPage/Display.js index b5de95c1..6176aab0 100644 --- a/src/components/SettingsPage/Display.js +++ b/src/components/SettingsPage/Display.js @@ -76,8 +76,8 @@ class TabProfile extends PureComponent { return (
- - + + this.handleChangeInput('password.state')(e.target.checked)} - />{' '} - with password - + + {get(inputValue, 'password.state') === true && ( - + { /> )} - - + + diff --git a/src/components/base/Label.js b/src/components/base/Label.js index bd87fd78..38203370 100644 --- a/src/components/base/Label.js +++ b/src/components/base/Label.js @@ -1,6 +1,11 @@ import styled from 'styled-components' +import { fontSize } from 'styled-system' -export default styled.label` +export default styled.label.attrs({ + fontSize: 0, +})` + ${fontSize}; display: block; text-transform: uppercase; + letter-spacing: 1px; ` diff --git a/src/components/base/Modal/index.js b/src/components/base/Modal/index.js index 1223a218..07abf42c 100644 --- a/src/components/base/Modal/index.js +++ b/src/components/base/Modal/index.js @@ -27,7 +27,7 @@ type Props = { } const springConfig = { - stiffness: 400, + stiffness: 350, } const mapStateToProps = (state, { name, isOpened }) => ({ @@ -137,6 +137,7 @@ export class Modal extends PureComponent { export const ModalBody = ({ children, onClose, + ...props }: { children: Element | string, onClose?: Function, @@ -147,7 +148,7 @@ export const ModalBody = ({ )} - {children} + {children} ) diff --git a/src/components/modals/AddAccount.js b/src/components/modals/AddAccount.js index 9770cfa9..ab92db2c 100644 --- a/src/components/modals/AddAccount.js +++ b/src/components/modals/AddAccount.js @@ -14,6 +14,8 @@ import { sendEvent } from 'renderer/events' import { addAccount } from 'actions/accounts' +import Box from 'components/base/Box' +import Text from 'components/base/Text' import Button from 'components/base/Button' import Input from 'components/base/Input' import Label from 'components/base/Label' @@ -23,25 +25,31 @@ import Select from 'components/base/Select' const Steps = { createAccount: (props: Object) => (
-
- - -
- + + + + + + + + +
), connectDevice: () =>
Connect your Ledger
, @@ -270,7 +278,10 @@ class AddAccountModal extends PureComponent { preventBackdropClick onClose={this.handleClose} render={({ onClose }) => ( - + + + {'Add account'} + )}