From a70cfc9b58a1744d61350684f97ed75eac494154 Mon Sep 17 00:00:00 2001 From: Suguru Hirahara Date: Sun, 2 Apr 2017 04:32:27 +0900 Subject: [PATCH] Refactor contributionStatement.js with Aphrodite Closes #7883 - Remove contributionStatement.less - Replace inlined braveLogo with a PNG file, verifiedIcon with a SVG file - Introduce constants for margins, borders, paddings, light gray, etc Auditors: Test Plan: 1. npm run add-simulated-payment-history 2. Open about:preferences#payments 3. Display the payments history --- js/about/contributionStatement.js | 381 +++++++++++++++++++++++++----- less/contributionStatement.less | 281 ---------------------- 2 files changed, 322 insertions(+), 340 deletions(-) delete mode 100644 less/contributionStatement.less diff --git a/js/about/contributionStatement.js b/js/about/contributionStatement.js index 9f8524bced2..eb8603e9b3a 100644 --- a/js/about/contributionStatement.js +++ b/js/about/contributionStatement.js @@ -23,7 +23,8 @@ const aboutActions = require('./aboutActions') const ipc = window.chrome.ipcRenderer -require('../../less/contributionStatement.less') +const {StyleSheet, css} = require('aphrodite/no-important') +const globalStyles = require('../../app/renderer/components/styles/global') class ContributionStatement extends ImmutableComponent { constructor () { @@ -116,7 +117,7 @@ class ContributionStatement extends ImmutableComponent { get htmlDataURL () { let generatedStylesheet = document.head.querySelector('style').outerHTML - let dataURL = 'data:text/html,' + encodeURIComponent('' + generatedStylesheet + '' + ReactDOM.findDOMNode(this).outerHTML + '') + let dataURL = 'data:text/html,' + encodeURIComponent('' + generatedStylesheet + '' + ReactDOM.findDOMNode(this).outerHTML + '') return dataURL } @@ -160,14 +161,14 @@ class ContributionStatement extends ImmutableComponent { get ContributionStatementHeader () { return ( -
-
-