mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-02-24 11:34:55 +01:00
Rework workspace header
This commit is contained in:
@@ -51,6 +51,7 @@ const _Button = forwardRef<HTMLButtonElement, ButtonProps>(function Button(
|
||||
() =>
|
||||
classNames(
|
||||
className,
|
||||
'max-w-full min-w-0', // Help with truncation
|
||||
'whitespace-nowrap outline-none',
|
||||
'flex-shrink-0 flex items-center',
|
||||
'focus-visible-or-class:ring rounded-md',
|
||||
|
||||
@@ -115,7 +115,7 @@ export const Dropdown = forwardRef<DropdownRef, DropdownProps>(function Dropdown
|
||||
|
||||
const windowSize = useWindowSize();
|
||||
const triggerRect = useMemo(() => {
|
||||
windowSize; // Make TS happy with this dep
|
||||
if (!windowSize) return null; // No-op to TS happy with this dep
|
||||
if (!open) return null;
|
||||
return buttonRef.current?.getBoundingClientRect();
|
||||
}, [open, windowSize]);
|
||||
@@ -368,6 +368,7 @@ function MenuItem({ className, focused, onFocus, item, onSelect, ...props }: Men
|
||||
tabIndex={-1}
|
||||
onMouseEnter={(e) => e.currentTarget.focus()}
|
||||
onMouseLeave={(e) => e.currentTarget.blur()}
|
||||
disabled={item.disabled}
|
||||
onFocus={handleFocus}
|
||||
onClick={handleClick}
|
||||
justify="start"
|
||||
|
||||
@@ -6,6 +6,11 @@
|
||||
|
||||
* {
|
||||
@apply cursor-text;
|
||||
@apply caret-transparent !important;
|
||||
}
|
||||
|
||||
.cm-cursor {
|
||||
@apply border-gray-800 !important;
|
||||
}
|
||||
|
||||
&.cm-focused {
|
||||
@@ -17,7 +22,7 @@
|
||||
}
|
||||
|
||||
.cm-line {
|
||||
@apply text-gray-800 caret-gray-800 pl-1 pr-1.5;
|
||||
@apply text-gray-800 pl-1 pr-1.5;
|
||||
}
|
||||
|
||||
.cm-placeholder {
|
||||
@@ -159,7 +164,7 @@
|
||||
@apply h-full flex items-center;
|
||||
|
||||
/* Break characters on line wrapping mode, useful for URL field.
|
||||
* We can make this dynamic if we need it to be configurable later
|
||||
* We can make this dynamic if we need it to be configurable later
|
||||
*/
|
||||
&.cm-lineWrapping {
|
||||
@apply break-all;
|
||||
|
||||
Reference in New Issue
Block a user