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

@@ -4,6 +4,7 @@ import { setAttribute } from '../socket';
import { DocStringComponent } from './DocStringComponent';
import '../App.css';
import { getIdFromFullAccessPath } from '../utils/stringUtils';
import { LevelName } from './NotificationsComponent';
// TODO: add button functionality
@@ -14,7 +15,7 @@ interface StringComponentProps {
readOnly: boolean;
docString: string;
isInstantUpdate: boolean;
addNotification: (message: string) => void;
addNotification: (message: string, levelname?: LevelName) => void;
}
export const StringComponent = React.memo((props: StringComponentProps) => {