Fix code editor width issue (#5895)
This commit is contained in:
parent
6c0da9a380
commit
855acc4e37
|
|
@ -21,7 +21,7 @@ const Wrapper = styled.span<{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
line-height: 13px;
|
line-height: 13px;
|
||||||
visibility: ${(props) => (props.visible ? "visible" : "hidden")};
|
visibility: ${(props) => (props.visible ? "visible" : "hidden")};
|
||||||
z-index: 1;
|
z-index: 3;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const CurlyBraces = styled.span`
|
const CurlyBraces = styled.span`
|
||||||
|
|
|
||||||
|
|
@ -574,7 +574,17 @@ class CodeEditor extends Component<Props, State> {
|
||||||
src={this.props.leftImage}
|
src={this.props.leftImage}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<div className="CodeEditorTarget" ref={this.codeEditorTarget} />
|
<div className="CodeEditorTarget" ref={this.codeEditorTarget}>
|
||||||
|
<BindingPrompt
|
||||||
|
editorTheme={this.props.theme}
|
||||||
|
isOpen={
|
||||||
|
showBindingPrompt(showEvaluatedValue, input.value) &&
|
||||||
|
!_.get(this.editor, "state.completionActive")
|
||||||
|
}
|
||||||
|
promptMessage={this.props.promptMessage}
|
||||||
|
showLightningMenu={this.props.showLightningMenu}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
{this.props.link && (
|
{this.props.link && (
|
||||||
<a
|
<a
|
||||||
className="linkStyles"
|
className="linkStyles"
|
||||||
|
|
@ -588,15 +598,6 @@ class CodeEditor extends Component<Props, State> {
|
||||||
{this.props.rightIcon && (
|
{this.props.rightIcon && (
|
||||||
<IconContainer>{this.props.rightIcon}</IconContainer>
|
<IconContainer>{this.props.rightIcon}</IconContainer>
|
||||||
)}
|
)}
|
||||||
<BindingPrompt
|
|
||||||
editorTheme={this.props.theme}
|
|
||||||
isOpen={
|
|
||||||
showBindingPrompt(showEvaluatedValue, input.value) &&
|
|
||||||
!_.get(this.editor, "state.completionActive")
|
|
||||||
}
|
|
||||||
promptMessage={this.props.promptMessage}
|
|
||||||
showLightningMenu={this.props.showLightningMenu}
|
|
||||||
/>
|
|
||||||
<ScrollIndicator containerRef={this.editorWrapperRef} />
|
<ScrollIndicator containerRef={this.editorWrapperRef} />
|
||||||
</EditorWrapper>
|
</EditorWrapper>
|
||||||
</EvaluatedValuePopup>
|
</EvaluatedValuePopup>
|
||||||
|
|
|
||||||
|
|
@ -232,6 +232,17 @@ export const EditorWrapper = styled.div<{
|
||||||
}
|
}
|
||||||
.CodeEditorTarget {
|
.CodeEditorTarget {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
${(props) =>
|
||||||
|
props.size === EditorSize.COMPACT
|
||||||
|
? `
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
`
|
||||||
|
: `
|
||||||
|
position: relative;
|
||||||
|
`}
|
||||||
|
${(props) => (props.isFocused ? `z-index: 3;` : `z-index: 0;`)}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user