diff options
author | Monika Hedman <monika_hedman@brown.edu> | 2019-02-18 19:03:34 -0500 |
---|---|---|
committer | Monika Hedman <monika_hedman@brown.edu> | 2019-02-18 19:03:34 -0500 |
commit | eaeb373ed90d35ab1c29cd9c3e4a79f6c8fa30b0 (patch) | |
tree | 2adb423bf0f782fce6861d703114bc0140520766 /src/client/views/EditableView.tsx | |
parent | 30986620c34c93e12509b2875e90cf5876838403 (diff) | |
parent | 842f571bfb4952d12804a8dbdc66aedbf2bf6b81 (diff) |
transforms update
Diffstat (limited to 'src/client/views/EditableView.tsx')
-rw-r--r-- | src/client/views/EditableView.tsx | 6 |
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> ) } |