Files
Homarr/src/components/modules/modules.tsx
Thomas Camlong e93a3a3b5f Add support for lists in module option
This feature allows a module maker to use a list as the different possible values for a module integration.
2022-06-28 11:27:23 +02:00

22 lines
555 B
TypeScript

// This interface is to be used in all the modules of the project
// Each module should have its own interface and call the following function:
// TODO: Add a function to register a module
// Note: Maybe use context to keep track of the modules
export interface IModule {
title: string;
description: string;
icon: React.ReactNode;
component: React.ComponentType;
options?: Option;
}
interface Option {
[x: string]: OptionValues;
}
export interface OptionValues {
name: string;
value: boolean | string | string[];
options?: string[];
}