Assorted fixes

Type fixes, support a couple more classes as functions for the examples, and switch TabPanels to registering ids instead of refs
This commit is contained in:
Ryan Gossiaux
2021-12-17 14:22:19 -08:00
parent 6076a60837
commit c5ed870827
6 changed files with 37 additions and 19 deletions

View File

@@ -15,14 +15,14 @@
activation: "auto" | "manual";
tabs: (HTMLElement | null)[];
panels: (HTMLElement | null)[];
panels: string[];
// State mutators
setSelectedIndex(index: number): void;
registerTab(tab: HTMLElement | null): void;
unregisterTab(tab: HTMLElement | null): void;
registerPanel(panel: HTMLElement | null): void;
unregisterPanel(panel: HTMLElement | null): void;
registerPanel(panel: string): void;
unregisterPanel(panel: string): void;
};
const TABS_CONTEXT_NAME = "TabsContext";