Download response, and some fixes

This commit is contained in:
Gregory Schier
2024-01-16 17:02:55 -08:00
parent 33374eefc7
commit ac1e646e68
12 changed files with 2650 additions and 4804 deletions

View File

@@ -37,7 +37,8 @@ export type DropdownItemDefault = {
key: string;
type?: 'default';
label: ReactNode;
hotkeyAction?: HotkeyAction;
hotKeyAction?: HotkeyAction;
hotKeyLabelOnly?: boolean;
variant?: 'danger';
disabled?: boolean;
hidden?: boolean;
@@ -338,12 +339,13 @@ const Menu = forwardRef<Omit<DropdownRef, 'open' | 'isOpen' | 'toggle'>, MenuPro
<>
{items.map(
(item) =>
item.type !== 'separator' && (
item.type !== 'separator' &&
!item.hotKeyLabelOnly && (
<MenuItemHotKey
key={item.key}
onSelect={handleSelect}
item={item}
action={item.hotkeyAction}
action={item.hotKeyAction}
/>
),
)}
@@ -440,7 +442,7 @@ function MenuItem({ className, focused, onFocus, item, onSelect, ...props }: Men
[focused],
);
const rightSlot = item.rightSlot ?? <HotKey action={item.hotkeyAction ?? null} />;
const rightSlot = item.rightSlot ?? <HotKey action={item.hotKeyAction ?? null} />;
return (
<Button

View File

@@ -121,6 +121,7 @@ export const Input = forwardRef<EditorView | undefined, InputProps>(function Inp
ref={wrapperRef}
className={classNames(
'w-full',
'pointer-events-auto', // Just in case we're placing in disabled parent
labelPosition === 'left' && 'flex items-center gap-2',
labelPosition === 'top' && 'flex-row gap-0.5',
)}