From c2211be2ae956331b7161852837cc5ec5b3789e2 Mon Sep 17 00:00:00 2001
From: Alexandru Munteanu <alexandru.munt@gmail.com>
Date: Wed, 28 Mar 2018 13:48:04 +0300
Subject: [PATCH] style(dashboard-card): change style of decline agree he
 buttons

---
 .../src/components/Dashboard/DashboardCard.js |  1 +
 .../Dashboard/EditorInChiefActions.js         |  4 +--
 .../Dashboard/HandlingEditorActions.js        | 26 +++++++++++++++----
 3 files changed, 24 insertions(+), 7 deletions(-)

diff --git a/packages/components-faraday/src/components/Dashboard/DashboardCard.js b/packages/components-faraday/src/components/Dashboard/DashboardCard.js
index d95dc0c25..02e08e23d 100644
--- a/packages/components-faraday/src/components/Dashboard/DashboardCard.js
+++ b/packages/components-faraday/src/components/Dashboard/DashboardCard.js
@@ -164,6 +164,7 @@ export default compose(
       const assignedHE =
         assignedPeople && assignedPeople.find(p => p.role === 'handlingEditor')
 
+      // this can be changed, but it works; cba
       if (isAdmin || isEic) {
         if (status === 'submitted' || status === 'he-invited')
           return <EditorInChiefActions project={project} />
diff --git a/packages/components-faraday/src/components/Dashboard/EditorInChiefActions.js b/packages/components-faraday/src/components/Dashboard/EditorInChiefActions.js
index 131ba4123..6d2079050 100644
--- a/packages/components-faraday/src/components/Dashboard/EditorInChiefActions.js
+++ b/packages/components-faraday/src/components/Dashboard/EditorInChiefActions.js
@@ -180,9 +180,9 @@ const HEActions = styled.div`
 const AssignButton = styled(Button)`
   ${defaultText};
   align-items: center;
-  background-color: ${th('colorPrimary')};
   color: ${th('colorTextReverse')};
-  text-align: center;
+  background-color: ${th('colorPrimary')};
   height: calc(${th('subGridUnit')}*5);
+  text-align: center;
 `
 // #endregion
diff --git a/packages/components-faraday/src/components/Dashboard/HandlingEditorActions.js b/packages/components-faraday/src/components/Dashboard/HandlingEditorActions.js
index 6e5cfde77..89f00fab9 100644
--- a/packages/components-faraday/src/components/Dashboard/HandlingEditorActions.js
+++ b/packages/components-faraday/src/components/Dashboard/HandlingEditorActions.js
@@ -1,8 +1,8 @@
 import React from 'react'
 import { connect } from 'react-redux'
-import styled from 'styled-components'
-import { th, Button } from '@pubsweet/ui'
 import { actions } from 'pubsweet-client'
+import { th, Button } from '@pubsweet/ui'
+import styled, { css } from 'styled-components'
 import { withHandlers, compose, withState } from 'recompose'
 import {
   withModal,
@@ -45,10 +45,10 @@ const ModalComponent = ({ type, ...rest }) =>
 
 const HandlingEditorActions = ({ showHEModal }) => (
   <Root>
-    <Button onClick={showHEModal('decline')}>DECLINE</Button>
-    <Button onClick={showHEModal()} primary>
+    <DecisionButton onClick={showHEModal('decline')}>DECLINE</DecisionButton>
+    <DecisionButton onClick={showHEModal()} primary>
       AGREE
-    </Button>
+    </DecisionButton>
   </Root>
 )
 
@@ -111,6 +111,22 @@ export default compose(
 )(HandlingEditorActions)
 
 // #region styled-components
+const defaultText = css`
+  font-family: ${th('fontReading')};
+  font-size: ${th('fontSizeBaseSmall')};
+`
+
+const DecisionButton = styled(Button)`
+  ${defaultText};
+  align-items: center;
+  color: ${({ primary }) =>
+    primary ? th('colorTextReverse') : th('colorPrimary')});
+  background-color: ${({ primary }) =>
+    primary ? th('colorPrimary') : th('backgroundColorReverse')};
+  height: calc(${th('subGridUnit')}*5);
+  text-align: center;
+`
+
 const DeclineRoot = styled.div`
   align-items: center;
   background-color: ${th('backgroundColor')};
-- 
GitLab