diff --git a/packages/core-components/api-report.md b/packages/core-components/api-report.md index 2d7f8d1d5c..f908d381e7 100644 --- a/packages/core-components/api-report.md +++ b/packages/core-components/api-report.md @@ -115,7 +115,7 @@ export type BreadcrumbsStyledBoxClassKey = 'root'; // Warning: (ae-forgotten-export) The symbol "IconComponentProps" needs to be exported by the entry point index.d.ts // -// @public (undocumented) +// @public export function BrokenImageIcon(props: IconComponentProps): JSX.Element; // @public @@ -129,7 +129,7 @@ export type CardActionsTopRightClassKey = 'root'; // Warning: (ae-forgotten-export) The symbol "CardTabProps" needs to be exported by the entry point index.d.ts // -// @public (undocumented) +// @public export function CardTab(props: PropsWithChildren): JSX.Element; // @public (undocumented) @@ -159,14 +159,13 @@ export interface CodeSnippetProps { } // Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "Content" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // -// @public (undocumented) +// @public export function Content(props: PropsWithChildren): JSX.Element; // Warning: (ae-forgotten-export) The symbol "ContentHeaderProps" needs to be exported by the entry point index.d.ts // -// @public (undocumented) +// @public export function ContentHeader( props: PropsWithChildren, ): JSX.Element; diff --git a/packages/core-components/src/components/EmptyState/EmptyState.tsx b/packages/core-components/src/components/EmptyState/EmptyState.tsx index 5abb41f48b..2d0891bd19 100644 --- a/packages/core-components/src/components/EmptyState/EmptyState.tsx +++ b/packages/core-components/src/components/EmptyState/EmptyState.tsx @@ -14,10 +14,10 @@ * limitations under the License. */ -import React from 'react'; +import Grid from '@material-ui/core/Grid'; import { makeStyles } from '@material-ui/core/styles'; import Typography from '@material-ui/core/Typography'; -import Grid from '@material-ui/core/Grid'; +import React from 'react'; import { EmptyStateImage } from './EmptyStateImage'; /** @public */ @@ -46,7 +46,13 @@ type Props = { action?: JSX.Element; }; -/** @public */ +/** + * Various placeholder views for empty state pages + * + * @public + * @remarks + * + */ export function EmptyState(props: Props) { const { title, description, missing, action } = props; const classes = useStyles(); diff --git a/packages/core-components/src/components/FeatureDiscovery/FeatureCalloutCircular.tsx b/packages/core-components/src/components/FeatureDiscovery/FeatureCalloutCircular.tsx index eb17641d89..61d97d7760 100644 --- a/packages/core-components/src/components/FeatureDiscovery/FeatureCalloutCircular.tsx +++ b/packages/core-components/src/components/FeatureDiscovery/FeatureCalloutCircular.tsx @@ -14,8 +14,8 @@ * limitations under the License. */ -import { makeStyles } from '@material-ui/core/styles'; import ClickAwayListener from '@material-ui/core/ClickAwayListener'; +import { makeStyles } from '@material-ui/core/styles'; import Typography from '@material-ui/core/Typography'; import React, { PropsWithChildren, @@ -108,7 +108,13 @@ type Placement = { textWidth: number; }; -/** @public */ +/** + * One-time, round 'telescope' animation showing new feature. + * + * @public + * @remarks + * + */ export function FeatureCalloutCircular(props: PropsWithChildren) { const { featureId, title, description, children } = props; const { show, hide } = useShowCallout(featureId); diff --git a/packages/core-components/src/icons/icons.tsx b/packages/core-components/src/icons/icons.tsx index d2a01ef010..2f75bdfa39 100644 --- a/packages/core-components/src/icons/icons.tsx +++ b/packages/core-components/src/icons/icons.tsx @@ -28,7 +28,7 @@ function useSystemIcon(key: string, props: IconComponentProps) { // Should match the list of overridable system icon keys in @backstage/core-app-api /** - * Broken Image {@link https://materialui.co/icon/broken-image | Icon} from material UI library + * Broken Image Icon from material UI library * * @public * @remarks diff --git a/packages/core-components/src/layout/Content/Content.tsx b/packages/core-components/src/layout/Content/Content.tsx index b5b1300796..12619666f9 100644 --- a/packages/core-components/src/layout/Content/Content.tsx +++ b/packages/core-components/src/layout/Content/Content.tsx @@ -14,9 +14,9 @@ * limitations under the License. */ -import React, { PropsWithChildren } from 'react'; +import { makeStyles, Theme } from '@material-ui/core/styles'; import classNames from 'classnames'; -import { Theme, makeStyles } from '@material-ui/core/styles'; +import React, { PropsWithChildren } from 'react'; /** @public */ export type BackstageContentClassKey = 'root' | 'stretch' | 'noPadding'; @@ -53,6 +53,14 @@ type Props = { className?: string; }; +/** + * HTML article tag wrapped with text alignment properties and custom className + * + * @public + * @remarks + * + */ + export function Content(props: PropsWithChildren) { const { className, stretch, noPadding, children, ...restProps } = props; const classes = useStyles(); diff --git a/packages/core-components/src/layout/ContentHeader/ContentHeader.tsx b/packages/core-components/src/layout/ContentHeader/ContentHeader.tsx index 2a8785514d..440408315d 100644 --- a/packages/core-components/src/layout/ContentHeader/ContentHeader.tsx +++ b/packages/core-components/src/layout/ContentHeader/ContentHeader.tsx @@ -18,9 +18,9 @@ * TODO favoriteable capability */ -import React, { PropsWithChildren, ReactNode } from 'react'; import { makeStyles } from '@material-ui/core/styles'; import Typography from '@material-ui/core/Typography'; +import React, { PropsWithChildren, ReactNode } from 'react'; import { Helmet } from 'react-helmet'; /** @public */ @@ -94,7 +94,14 @@ type ContentHeaderProps = { textAlign?: 'left' | 'right' | 'center'; }; -/** @public */ +/** + * Wrapper of material-ui h2 Typography component with body2 description + * + * @public + * @remarks + * + */ + export function ContentHeader(props: PropsWithChildren) { const { description, diff --git a/packages/core-components/src/layout/ErrorPage/ErrorPage.tsx b/packages/core-components/src/layout/ErrorPage/ErrorPage.tsx index 3d55307c81..e3bcc372dc 100644 --- a/packages/core-components/src/layout/ErrorPage/ErrorPage.tsx +++ b/packages/core-components/src/layout/ErrorPage/ErrorPage.tsx @@ -14,15 +14,15 @@ * limitations under the License. */ -import React from 'react'; -import Typography from '@material-ui/core/Typography'; -import Link from '@material-ui/core/Link'; -import Grid from '@material-ui/core/Grid'; -import { makeStyles } from '@material-ui/core/styles'; import { BackstageTheme } from '@backstage/theme'; -import { MicDrop } from './MicDrop'; +import Grid from '@material-ui/core/Grid'; +import Link from '@material-ui/core/Link'; +import { makeStyles } from '@material-ui/core/styles'; +import Typography from '@material-ui/core/Typography'; +import React from 'react'; import { useNavigate } from 'react-router'; import { useSupportConfig } from '../../hooks'; +import { MicDrop } from './MicDrop'; interface IErrorPageProps { status: string; @@ -55,7 +55,13 @@ const useStyles = makeStyles( { name: 'BackstageErrorPage' }, ); -/** @public */ +/** + * Error page with status and description + * + * @public + * @remarks + * + */ export function ErrorPage(props: IErrorPageProps) { const { status, statusMessage, additionalInfo } = props; const classes = useStyles();