updates addNotification type hints in components

This commit is contained in:
Mose Müller
2023-11-27 15:41:30 +01:00
parent 914997cc6b
commit 613b1dd6a4
12 changed files with 24 additions and 12 deletions

View File

@ -10,6 +10,7 @@ import { ListComponent } from './ListComponent';
import { DataServiceComponent, DataServiceJSON } from './DataServiceComponent';
import { ImageComponent } from './ImageComponent';
import { ColouredEnumComponent } from './ColouredEnumComponent';
import { LevelName } from './NotificationsComponent';
type AttributeType =
| 'str'
@ -40,7 +41,7 @@ type GenericComponentProps = {
name: string;
parentPath: string;
isInstantUpdate: boolean;
addNotification: (message: string) => void;
addNotification: (message: string, levelname?: LevelName) => void;
};
export const GenericComponent = React.memo(