diff options
author | bob <bcz@cs.brown.edu> | 2019-09-11 15:45:37 -0400 |
---|---|---|
committer | bob <bcz@cs.brown.edu> | 2019-09-11 15:45:37 -0400 |
commit | d7d73856ed405cef01b4cf727ca56f4d9a31e894 (patch) | |
tree | 6ee45e9b15e44238ba758f0933e9f0fee857c5b2 /src/client/views/EditableView.tsx | |
parent | 71594c0e64d2559f2a72bcbc5faee1db78eecfb8 (diff) |
cleaned up ScriptBox EditScript's restructured menus for dealing with onClicks... exposed more layout paramters for EditableViews.
Diffstat (limited to 'src/client/views/EditableView.tsx')
-rw-r--r-- | src/client/views/EditableView.tsx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client/views/EditableView.tsx b/src/client/views/EditableView.tsx index 1bdb26b3d..e9db4b048 100644 --- a/src/client/views/EditableView.tsx +++ b/src/client/views/EditableView.tsx @@ -28,7 +28,8 @@ export interface EditableProps { contents: any; fontStyle?: string; fontSize?: number; - height?: number; + height?: number | "auto"; + maxHeight?: number; display?: string; autosuggestProps?: { resetValue: () => void; @@ -145,7 +146,7 @@ export class EditableView extends React.Component<EditableProps> { if (this.props.autosuggestProps) this.props.autosuggestProps.resetValue(); return ( <div className={`editableView-container-editing${this.props.oneLine ? "-oneLine" : ""}`} - style={{ display: this.props.display, minHeight: "20px", height: "auto", maxHeight: `${this.props.height}` }} + style={{ display: this.props.display, minHeight: "20px", height: `${this.props.height ? this.props.height : "auto"}`, maxHeight: `${this.props.maxHeight}` }} onClick={this.onClick}> <span style={{ fontStyle: this.props.fontStyle, fontSize: this.props.fontSize }}>{this.props.contents}</span> </div> |