mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-20 16:44:06 +01:00
More work on the layout
This commit is contained in:
@@ -1,17 +1,18 @@
|
||||
.cm-wrapper {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
}
|
||||
@apply h-full;
|
||||
|
||||
.cm-wrapper .cm-editor {
|
||||
@apply inset-0;
|
||||
position: absolute !important;
|
||||
font-size: 0.85em;
|
||||
&.cm-full-height {
|
||||
@apply relative;
|
||||
|
||||
.cm-editor {
|
||||
@apply inset-0;
|
||||
position: absolute !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.cm-editor {
|
||||
@apply w-full block;
|
||||
@apply w-full block text-[0.85rem];
|
||||
|
||||
&.cm-focused {
|
||||
outline: none !important;
|
||||
|
||||
@@ -11,6 +11,7 @@ import { baseExtensions, getLanguageExtension, multiLineExtensions } from './ext
|
||||
import { singleLineExt } from './singleLine';
|
||||
|
||||
export interface EditorProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
||||
height?: 'auto' | 'full';
|
||||
contentType?: string;
|
||||
autoFocus?: boolean;
|
||||
valueKey?: string | number;
|
||||
@@ -23,6 +24,7 @@ export interface EditorProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onCha
|
||||
}
|
||||
|
||||
export default function Editor({
|
||||
height,
|
||||
contentType,
|
||||
autoFocus,
|
||||
placeholder,
|
||||
@@ -95,6 +97,7 @@ export default function Editor({
|
||||
className={classnames(
|
||||
className,
|
||||
'cm-wrapper text-base',
|
||||
height === 'auto' ? 'cm-auto-height' : 'cm-full-height',
|
||||
singleLine ? 'cm-singleline' : 'cm-multiline',
|
||||
)}
|
||||
{...props}
|
||||
|
||||
Reference in New Issue
Block a user