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 -2
View File
@@ -181,8 +181,7 @@ provided by the Addon framework.
```tsx
// plugins/your-plugin/src/addons/MakeAllImagesCatGifs.tsx
import React, { useEffect } from 'react';
import { useEffect } from 'react';
import { useShadowRootElements } from '@backstage/plugin-techdocs-react';
// This is a normal react component; in order to make it an Addon, you would
+5 -4
View File
@@ -135,6 +135,7 @@ You can easily customize the TechDocs home page using TechDocs panel layout
Modify your `App.tsx` as follows:
```tsx
import { Fragment, PropsWithChildren } from 'react';
import { TechDocsCustomHome } from '@backstage/plugin-techdocs';
//...
@@ -175,7 +176,7 @@ const techDocsTabsConfig = [
filterPredicate: filterEntity,
panelType: 'TechDocsIndexPage',
title: 'All',
panelProps: { PageWrapper: React.Fragment, CustomHeader: React.Fragment, options: options },
panelProps: { PageWrapper: Fragment, CustomHeader: Fragment, options: options },
},
],
},
@@ -184,7 +185,7 @@ const docsFilter = {
kind: ['Location', 'Resource', 'Component'],
'metadata.annotations.featured-docs': CATALOG_FILTER_EXISTS,
}
const customPageWrapper = ({ children }: React.PropsWithChildren<{}>) =>
const customPageWrapper = ({ children }: PropsWithChildren<{}>) =>
(<PageWithHeader title="Docs" themeId="documentation">{children}</PageWithHeader>)
const AppRoutes = () => {
<FlatRoutes>
@@ -212,7 +213,7 @@ maintain such a component in a new directory at
For example, you can define the following Custom home page component:
```tsx
import React from 'react';
import { ReactNode } from 'react';
import { Content } from '@backstage/core-components';
import {
@@ -232,7 +233,7 @@ import { EntityListDocsGrid } from '@backstage/plugin-techdocs';
export type CustomTechDocsHomeProps = {
groups?: Array<{
title: React.ReactNode;
title: ReactNode;
filterPredicate: ((entity: Entity) => boolean) | string;
}>;
};