mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-15 01:52:42 +03:00
contacts: add resizable "notes" field
This commit is contained in:
parent
f316d0f118
commit
ced119271f
@ -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} />
|
||||
</div>
|
||||
</div>
|
||||
|
@ -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 (
|
||||
<div>
|
||||
<p className="f9 gray2">{props.title}</p>
|
||||
@ -26,7 +30,7 @@ export class EditElement extends Component {
|
||||
<textarea
|
||||
ref={props.title}
|
||||
className="w-100 ba pl3 b--gray4"
|
||||
style={{ resize: "none", height: 40, paddingTop: 10 }}
|
||||
style={ inputStyles }
|
||||
onChange={(e) => {
|
||||
let val = (' ' + e.target.value).slice(1);
|
||||
this.setState({
|
||||
|
Loading…
Reference in New Issue
Block a user