Some small tweaks for Vim mode

This commit is contained in:
Gregory Schier
2025-01-08 06:11:05 -08:00
parent 81005165f3
commit 1920f720a9
4 changed files with 32 additions and 22 deletions

View File

@@ -13,19 +13,20 @@
/* Vim-mode cursor */
.cm-fat-cursor {
@apply bg-text opacity-60;
}
&.cm-focused {
outline: none !important;
@apply outline-0 bg-text !important;
@apply text-surface !important;
}
&:not(.cm-focused) {
.cm-cursor, .cm-fat-cursor {
display: none;
@apply hidden;
}
}
&.cm-focused {
outline: none !important;
}
.cm-content {
@apply py-0;
}
@@ -106,7 +107,7 @@
}
.cm-line {
@apply px-2 overflow-hidden;
@apply overflow-hidden;
}
}

View File

@@ -27,6 +27,7 @@ export type InputProps = Pick<
labelPosition?: 'top' | 'left';
labelClassName?: string;
containerClassName?: string;
inputWrapperClassName?: string;
onChange?: (value: string) => void;
onFocus?: () => void;
onBlur?: () => void;
@@ -48,6 +49,7 @@ export const Input = forwardRef<EditorView | undefined, InputProps>(function Inp
{
className,
containerClassName,
inputWrapperClassName,
defaultValue,
forceUpdateKey,
hideLabel,
@@ -161,7 +163,8 @@ export const Input = forwardRef<EditorView | undefined, InputProps>(function Inp
{leftSlot}
<HStack
className={classNames(
'w-full min-w-0',
inputWrapperClassName,
'w-full min-w-0 px-2',
leftSlot && 'pl-0.5 -ml-2',
rightSlot && 'pr-0.5 -mr-2',
)}