From a71f7d6b13f530b70b3f467306ca760ead6305d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Espino?= Date: Mon, 2 Nov 2020 10:46:28 +0100 Subject: [PATCH] Removing general hover classes and moving them into each component css --- webapp/src/components/boardCard.scss | 9 +++++ webapp/src/components/boardCard.tsx | 5 ++- webapp/src/components/cardDetail.scss | 10 ++++- webapp/src/components/cardDetail.tsx | 4 +- webapp/src/components/sidebar.tsx | 6 +-- webapp/src/components/tableRow.scss | 4 ++ webapp/src/components/tableRow.tsx | 18 ++++----- webapp/src/components/viewTitle.scss | 7 +++- webapp/src/components/viewTitle.tsx | 2 +- webapp/src/styles/main.scss | 57 --------------------------- 10 files changed, 44 insertions(+), 78 deletions(-) diff --git a/webapp/src/components/boardCard.scss b/webapp/src/components/boardCard.scss index 946fbb293..a0f618eef 100644 --- a/webapp/src/components/boardCard.scss +++ b/webapp/src/components/boardCard.scss @@ -50,4 +50,13 @@ margin-right: 5px; } } + .IconButton { + border-radius: 3px; + margin-right: 6px; + padding: 0; + background: rgb(var(--main-fg), 0.1); + box-shadow: rgba(var(--main-fg), 0.1) 0px 0px 0px 1px, rgba(var(--main-fg), 0.1) 0px 2px 4px; + height: 24px; + width: 24px; + } } diff --git a/webapp/src/components/boardCard.tsx b/webapp/src/components/boardCard.tsx index ad780846a..f16cb0965 100644 --- a/webapp/src/components/boardCard.tsx +++ b/webapp/src/components/boardCard.tsx @@ -13,6 +13,7 @@ import Menu from '../widgets/menu' import OptionsIcon from '../widgets/icons/options' import DeleteIcon from '../widgets/icons/delete' import DuplicateIcon from '../widgets/icons/duplicate' +import IconButton from '../widgets/buttons/iconButton' import PropertyValueElement from './propertyValueElement' @@ -88,8 +89,8 @@ class BoardCard extends React.Component { className='optionsMenu' stopPropagationOnToggle={true} > -
- + }/> + } id='delete' diff --git a/webapp/src/components/cardDetail.scss b/webapp/src/components/cardDetail.scss index fccc7d3c2..a5a216440 100644 --- a/webapp/src/components/cardDetail.scss +++ b/webapp/src/components/cardDetail.scss @@ -3,13 +3,19 @@ width: 100%; } - .octo-hovercontrols { + .add-buttons { + display: flex; + flex-direction: column; + min-height: 30px; + color:rgba(var(--main-fg), 0.4); + width: 100%; + align-items: flex-start; .Button { display: none; } &:hover { .Button { - display: block; + display: flex; } } } diff --git a/webapp/src/components/cardDetail.tsx b/webapp/src/components/cardDetail.tsx index 49336e2b2..536ed935e 100644 --- a/webapp/src/components/cardDetail.tsx +++ b/webapp/src/components/cardDetail.tsx @@ -99,7 +99,7 @@ class CardDetail extends React.Component { ) } else { contentElements = (
-
+
{ size='l' /> {!icon && -
+
{this.state.showCard && diff --git a/webapp/src/components/viewTitle.scss b/webapp/src/components/viewTitle.scss index 5ade542ef..552638a1a 100644 --- a/webapp/src/components/viewTitle.scss +++ b/webapp/src/components/viewTitle.scss @@ -4,7 +4,12 @@ flex-direction: row; align-items: center; - &.octo-hovercontrols { + &.add-buttons { + flex-direction: column; + min-height: 30px; + color:rgba(var(--main-fg), 0.4); + width: 100%; + align-items: flex-start; .Button { display: none; } diff --git a/webapp/src/components/viewTitle.tsx b/webapp/src/components/viewTitle.tsx index 99aa7e8bf..c992b88b5 100644 --- a/webapp/src/components/viewTitle.tsx +++ b/webapp/src/components/viewTitle.tsx @@ -39,7 +39,7 @@ class ViewTitle extends React.Component { return ( <> -
+