aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/EditableView.tsx
diff options
context:
space:
mode:
authorab <abdullah_ahmed@brown.edu>2019-02-18 18:27:01 -0500
committerab <abdullah_ahmed@brown.edu>2019-02-18 18:27:01 -0500
commitc03e3fc75ef9ffb56cbfadb0c3164ead1fea4a40 (patch)
tree12b378c7bfd819aa7b22662281790ae61698daa7 /src/client/views/EditableView.tsx
parent61aa3a0a34a647a7f414fbeb72345675a5154433 (diff)
parent3f98d6ec6050e7faa15179871f0d9669c1188a78 (diff)
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into decor
Diffstat (limited to 'src/client/views/EditableView.tsx')
-rw-r--r--src/client/views/EditableView.tsx6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/client/views/EditableView.tsx b/src/client/views/EditableView.tsx
index 2e784d3f9..3d1c2ebf4 100644
--- a/src/client/views/EditableView.tsx
+++ b/src/client/views/EditableView.tsx
@@ -6,6 +6,7 @@ export interface EditableProps {
GetValue(): string;
SetValue(value: string): boolean;
contents: any;
+ height: number
}
@observer
@@ -29,9 +30,10 @@ export class EditableView extends React.Component<EditableProps> {
style={{ width: "100%" }}></input>
} else {
return (
- <div>
+ <div style={{ alignItems: "center", display: "flex", height: "100%", maxHeight: `${this.props.height}` }}
+ onClick={action(() => this.editing = true)}
+ >
{this.props.contents}
- <button onClick={action(() => this.editing = true)}>Edit</button>
</div>
)
}