From 32b428809c70dbd52786b0aea4ec1529110dc25f Mon Sep 17 00:00:00 2001 From: Vladimir Volek Date: Fri, 10 Aug 2018 15:33:23 +0200 Subject: [PATCH 001/103] h2 refactored to component --- .stylelintrc | 10 + package.json | 4 + src/js/components/common/Heading.js | 25 +- src/js/components/common/Log.js | 3 +- src/js/components/common/Notification.js | 6 +- src/js/components/landing/ConnectDevice.js | 8 +- src/js/components/landing/LandingPage.js | 3 +- .../account/send/PendingTransactions.js | 3 +- .../wallet/account/send/SendForm.js | 3 +- .../wallet/account/sign/SignVerify.js | 8 +- .../wallet/account/summary/Summary.js | 5 +- src/js/components/wallet/pages/Bootloader.js | 4 +- src/js/components/wallet/pages/Dashboard.js | 6 +- .../components/wallet/pages/DeviceSettings.js | 6 +- src/js/components/wallet/pages/Initialize.js | 5 +- src/styles/acquire.less | 9 - yarn.lock | 790 +++++++++++++++++- 17 files changed, 830 insertions(+), 68 deletions(-) create mode 100644 .stylelintrc diff --git a/.stylelintrc b/.stylelintrc new file mode 100644 index 00000000..aadcf1e1 --- /dev/null +++ b/.stylelintrc @@ -0,0 +1,10 @@ +{ + "processors": [ + "stylelint-processor-styled-components" + ], + "extends": [ + "stylelint-config-standard", + "stylelint-config-styled-components" + ], + "syntax": "scss" +} \ No newline at end of file diff --git a/package.json b/package.json index 25730063..28a43a7e 100644 --- a/package.json +++ b/package.json @@ -86,6 +86,10 @@ "jest": "^23.4.2", "less": "^3.0.1", "less-loader": "4.1.0", + "stylelint": "^9.4.0", + "stylelint-config-standard": "^18.2.0", + "stylelint-config-styled-components": "^0.1.1", + "stylelint-processor-styled-components": "^1.3.2", "webpack-cli": "^2.1.3", "webpack-dev-server": "^3.1.4", "yargs": "11.0.0" diff --git a/src/js/components/common/Heading.js b/src/js/components/common/Heading.js index 9db6fb9f..88ffb4aa 100644 --- a/src/js/components/common/Heading.js +++ b/src/js/components/common/Heading.js @@ -1,5 +1,3 @@ -// @flow - import styled, { css } from 'styled-components'; import colors from '~/js/config/colors'; @@ -11,30 +9,33 @@ const baseStyles = css` `; const H1 = styled.h1` - ${baseStyles} - font-size: 16px; + ${baseStyles} + font-size: 18px; `; const H2 = styled.h2` - ${baseStyles}; - font-size: 14px; + ${baseStyles}; + font-size: 16px; + + ${props => props.claim && css` + font-size: 36px; + padding-bottom: 24px; + `} `; const H3 = styled.h3` ${baseStyles}; - font-size: 12px; + font-size: 14px; `; const H4 = styled.h4` ${baseStyles}; - font-size: 10px; + font-size: 12px; `; -const Heading = { +export { H1, H2, H3, H4, -}; - -module.exports = Heading; \ No newline at end of file +}; \ No newline at end of file diff --git a/src/js/components/common/Log.js b/src/js/components/common/Log.js index e0b8ef2d..d104ee32 100644 --- a/src/js/components/common/Log.js +++ b/src/js/components/common/Log.js @@ -4,6 +4,7 @@ import React from 'react'; import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; +import { H2 } from '~/js/components/common/Heading'; import * as LogActions from '~/js/actions/LogActions'; import type { State, Dispatch } from '~/flowtype'; @@ -25,7 +26,7 @@ const Log = (props: Props): ?React$Element => { return (