update to react 18

We were stuck on react 16.x for a long time but dependencies seem to
have caught up enough that migration is trivial now.
This commit is contained in:
David Lechner
2023-05-17 16:33:47 -05:00
committed by David Lechner
parent ca63d048aa
commit bf4670b25d
66 changed files with 226 additions and 449 deletions
+3 -3
View File
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
// Copyright (c) 2022 The Pybricks Authors
// Copyright (c) 2022-2023 The Pybricks Authors
import './HelpDialog.scss';
import { Classes } from '@blueprintjs/core';
@@ -9,7 +9,7 @@ import {
Popover2Arrow,
} from '@blueprintjs/popover2/lib/cjs/popover2Arrow';
import classNames from 'classnames';
import React, { useEffect, useMemo, useRef, useState } from 'react';
import React, { PropsWithChildren, useEffect, useMemo, useRef, useState } from 'react';
import {
DismissButton,
FocusScope,
@@ -36,7 +36,7 @@ type HelpDialogProps = {
};
/** React component for showing help as a dialog. */
const HelpDialog: React.FunctionComponent<HelpDialogProps> = ({
const HelpDialog: React.FunctionComponent<PropsWithChildren<HelpDialogProps>> = ({
title,
isOpen,
openButton,