mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-26 19:31:12 +01:00
Some small tweaks for Vim mode
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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',
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user