feat: dark mode input revamp (#6546)

This commit is contained in:
Anoop M D
2025-12-29 22:37:49 +05:30
committed by GitHub
parent 0d536fb365
commit 6d77cacbc4
64 changed files with 324 additions and 239 deletions

View File

@@ -2,7 +2,7 @@ import styled from 'styled-components';
const StyledWrapper = styled.div`
width: 100%;
height: 30px;
height: ${(props) => (props.$isCompact ? '1.375rem' : '1.875rem')};
overflow-y: hidden;
overflow-x: hidden;
@@ -14,14 +14,14 @@ const StyledWrapper = styled.div`
.CodeMirror {
background: transparent;
height: 34px;
height: ${(props) => (props.$isCompact ? '1.375rem' : '2.125rem')};
font-size: ${(props) => props.theme.font.size.base};
line-height: 30px;
line-height: ${(props) => (props.$isCompact ? '1.375rem' : '1.875rem')};
overflow: hidden;
.CodeMirror-scroll {
overflow: hidden !important;
padding-bottom: 50px !important;
padding-bottom: 3.125rem !important;
}
.CodeMirror-vscrollbar,
@@ -40,8 +40,8 @@ const StyledWrapper = styled.div`
}
.CodeMirror-cursor {
height: 20px !important;
margin-top: 5px !important;
height: ${(props) => (props.$isCompact ? '0.875rem' : '1.25rem')} !important;
margin-top: ${(props) => (props.$isCompact ? '0.25rem' : '0.3125rem')} !important;
border-left: 1px solid ${(props) => props.theme.text} !important;
}

View File

@@ -305,6 +305,7 @@ class SingleLineEditor extends Component {
<StyledWrapper
ref={this.editorRef}
className={`single-line-editor grow ${this.props.readOnly ? 'read-only' : ''}`}
$isCompact={this.props.isCompact}
{...(this.props['data-testid'] ? { 'data-testid': this.props['data-testid'] } : {})}
/>
<div className="flex items-center">