Open StringKe opened 2 years ago
+1 here, thinking about moving to kbar
interface KBarMethods {
open: (opts?: { parent: string }) => void;
close: () => void;
setParent: (parent: string) => void;
}
export interface KBarAction {
id: string;
title: string;
hotkey?: string;
handler?: Function;
mdIcon?: string;
icon?: string;
parent?: string;
keywords?: string;
children?: string[];
section?: string;
}
export interface KBarProps {
hideBreadcrumbs?: boolean,
...
}
type KBar = Pick<HTMLElement, "addEventListener" | "removeEventListener"> &
KBarMethods & KBarProps & { data: KBarAction[] };
declare global {
namespace JSX {
interface IntrinsicElements {
["ninja-keys"]: KBar;
}
}
}
+1
My answer didnt help @williamleiby ?
I try to add definitions, but the IDE prompts me for indeed a lot of attributes, including those of HTML elements.