Files
Homarr/src/modules/ModuleTypes.d.ts

25 lines
596 B
TypeScript
Raw Normal View History

// 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
import { TablerIcon } from '@tabler/icons';
// Note: Maybe use context to keep track of the modules
2022-05-10 18:56:16 +02:00
export interface IModule {
title: string;
description: string;
icon: TablerIcon;
component: React.ComponentType;
options?: Option;
}
interface Option {
[x: string]: OptionValues;
}
export interface OptionValues {
name: string;
value: boolean | string | string[];
options?: string[];
}