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

@@ -2,6 +2,7 @@ import React, { useEffect, useRef } from 'react';
import { InputGroup, Form, Row, Col } from 'react-bootstrap';
import { setAttribute } from '../socket';
import { DocStringComponent } from './DocStringComponent';
import { LevelName } from './NotificationsComponent';
interface EnumComponentProps {
name: string;
@@ -9,7 +10,7 @@ interface EnumComponentProps {
value: string;
docString?: string;
enumDict: Record<string, string>;
addNotification: (message: string) => void;
addNotification: (message: string, levelname?: LevelName) => void;
}
export const EnumComponent = React.memo((props: EnumComponentProps) => {