mirror of
https://github.com/wavetermdev/waveterm.git
synced 2024-12-22 16:48:23 +01:00
9233b3dbd7
Co-authored-by: Sylvia Crowe <software@oneirocosm.com> Co-authored-by: sawka <mike.sawka@gmail.com>
15 lines
482 B
TypeScript
15 lines
482 B
TypeScript
// Copyright 2023, Command Line Inc.
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
import { TosModal } from "./tos";
|
|
import { UserInputModal } from "./userinputmodal";
|
|
|
|
const modalRegistry: { [key: string]: React.ComponentType<any> } = {
|
|
[TosModal.displayName || "TosModal"]: TosModal,
|
|
[UserInputModal.displayName || "UserInputModal"]: UserInputModal,
|
|
};
|
|
|
|
export const getModalComponent = (key: string): React.ComponentType<any> | undefined => {
|
|
return modalRegistry[key];
|
|
};
|