From ced119271f9173eb1914b5a5f5e856998eb112f4 Mon Sep 17 00:00:00 2001 From: Matilde Park Date: Thu, 13 Feb 2020 12:27:27 -0700 Subject: [PATCH 1/2] contacts: add resizable "notes" field --- .../contacts/src/js/components/lib/contact-card.js | 1 + .../contacts/src/js/components/lib/edit-element.js | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/pkg/interface/contacts/src/js/components/lib/contact-card.js b/pkg/interface/contacts/src/js/components/lib/contact-card.js index 7a74c9805..1ba60e35d 100644 --- a/pkg/interface/contacts/src/js/components/lib/contact-card.js +++ b/pkg/interface/contacts/src/js/components/lib/contact-card.js @@ -384,6 +384,7 @@ export class ContactCard extends Component { onChange={this.notesToSet} onDeleteClick={() => this.setField("removeNotes")} onSaveClick={() => this.setField("notes")} + resizable={true} showButtons={!props.share} /> diff --git a/pkg/interface/contacts/src/js/components/lib/edit-element.js b/pkg/interface/contacts/src/js/components/lib/edit-element.js index 010904973..bc6cc383c 100644 --- a/pkg/interface/contacts/src/js/components/lib/edit-element.js +++ b/pkg/interface/contacts/src/js/components/lib/edit-element.js @@ -1,5 +1,5 @@ import React, { Component } from 'react' -import { Route, Link } from 'react-router-dom'; +import { Route, Link } from 'react-router-dom'; export class EditElement extends Component { @@ -19,6 +19,10 @@ export class EditElement extends Component { state.currentValue !== "" ); + let inputStyles = (props.resizable) + ? { resize: "vertical", height: 40, paddingTop: 10 } + : { resize: "none", height: 40, paddingTop: 10 } + return (

{props.title}

@@ -26,7 +30,7 @@ export class EditElement extends Component {