From bc24d9e696560780c13c94a39393cd8b6bf16147 Mon Sep 17 00:00:00 2001 From: David Walsh Date: Fri, 30 Apr 2021 20:15:19 -0500 Subject: [PATCH] Ensure method of adding contact when contacts exist (#10963) --- .../contact-list-tab.component.js | 23 +++++++++++++++++++ ui/pages/settings/contact-list-tab/index.scss | 19 ++++----------- 2 files changed, 28 insertions(+), 14 deletions(-) diff --git a/ui/pages/settings/contact-list-tab/contact-list-tab.component.js b/ui/pages/settings/contact-list-tab/contact-list-tab.component.js index 625bfbb09..53e38c0a3 100644 --- a/ui/pages/settings/contact-list-tab/contact-list-tab.component.js +++ b/ui/pages/settings/contact-list-tab/contact-list-tab.component.js @@ -5,6 +5,7 @@ import { CONTACT_ADD_ROUTE, CONTACT_VIEW_ROUTE, } from '../../../helpers/constants/routes'; +import Button from '../../../components/ui/button'; import EditContact from './edit-contact'; import AddContact from './add-contact'; import ViewContact from './view-contact'; @@ -66,6 +67,25 @@ export default class ContactListTab extends Component { ); } + renderAddButton() { + const { history } = this.props; + + return ( +
+ +
+ ); + } + renderContactContent() { const { viewingContact, @@ -106,10 +126,13 @@ export default class ContactListTab extends Component { } render() { + const { addingContact, addressBook } = this.props; + return (
{this.renderAddressBookContent()} {this.renderContactContent()} + {!addingContact && addressBook.length > 0 && this.renderAddButton()}
); } diff --git a/ui/pages/settings/contact-list-tab/index.scss b/ui/pages/settings/contact-list-tab/index.scss index 7d1d26606..748a45ddc 100644 --- a/ui/pages/settings/contact-list-tab/index.scss +++ b/ui/pages/settings/contact-list-tab/index.scss @@ -250,23 +250,14 @@ .address-book-add-button { &__button { position: absolute; - top: 80px; + top: 85px; right: 16px; - height: 56px; - width: 56px; - border-radius: 18px; - display: flex; - justify-content: center; - align-items: center; - border-radius: 50%; - border-width: 1px; - background: $primary-blue; - margin-right: 5px; - cursor: pointer; - box-shadow: 0 2px 16px rgba(0, 0, 0, 0.25); + width: auto; + border-radius: 100px; @media screen and (max-width: 576px) { - top: 10px; + top: 16px; + right: 60px; } } }