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

@ -3,6 +3,7 @@ import { runMethod } from '../socket';
import { Button, InputGroup, Form, Collapse } from 'react-bootstrap';
import { DocStringComponent } from './DocStringComponent';
import { getIdFromFullAccessPath } from '../utils/stringUtils';
import { LevelName } from './NotificationsComponent';
interface MethodProps {
name: string;
@ -10,7 +11,7 @@ interface MethodProps {
parameters: Record<string, string>;
docString?: string;
hideOutput?: boolean;
addNotification: (message: string) => void;
addNotification: (message: string, levelname?: LevelName) => void;
}
export const MethodComponent = React.memo((props: MethodProps) => {