chore: update react imports

Signed-off-by: Paul Schultz <pschultz@pobox.com>
This commit is contained in:
Paul Schultz
2025-01-28 10:21:17 -06:00
parent 02981a2377
commit 2e26579e06
1282 changed files with 2776 additions and 3434 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ To use the `GroupListPicker` component you'll need to import it and add it to yo
```diff
+ import { GroupListPicker } from '@backstage/plugin-org-react';
+ import React, { useState } from 'react';
+ import { useState } from 'react';
+ const [group, setGroup] = useState<GroupEntity | undefined>();
@@ -14,7 +14,6 @@
* limitations under the License.
*/
import React from 'react';
import { render, waitFor } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { ApiProvider } from '@backstage/core-app-api';
@@ -14,7 +14,7 @@
* limitations under the License.
*/
import React, { useCallback } from 'react';
import { MouseEvent, useState, useCallback } from 'react';
import {
catalogApiRef,
humanizeEntityRef,
@@ -45,10 +45,10 @@ export const GroupListPicker = (props: GroupListPickerProps) => {
const catalogApi = useApi(catalogApiRef);
const { onChange, groupTypes, placeholder = '', defaultValue = '' } = props;
const [anchorEl, setAnchorEl] = React.useState<HTMLElement | null>(null);
const [inputValue, setInputValue] = React.useState(defaultValue);
const [anchorEl, setAnchorEl] = useState<HTMLElement | null>(null);
const [inputValue, setInputValue] = useState(defaultValue);
const handleClick = (event: React.MouseEvent<HTMLElement>) => {
const handleClick = (event: MouseEvent<HTMLElement>) => {
setAnchorEl(event.currentTarget);
};
@@ -14,7 +14,7 @@
* limitations under the License.
*/
import React from 'react';
import { MouseEvent } from 'react';
import Typography from '@material-ui/core/Typography';
import Button from '@material-ui/core/Button';
import { makeStyles } from '@material-ui/core/styles';
@@ -46,7 +46,7 @@ const useStyles = makeStyles(theme => ({
}));
type GroupListPickerButtonProps = {
handleClick: (event: React.MouseEvent<HTMLElement>) => void;
handleClick: (event: MouseEvent<HTMLElement>) => void;
group: string | undefined;
};