diff --git a/UNRELEASED.md b/UNRELEASED.md index bf351e31365..0bb9a49e03d 100644 --- a/UNRELEASED.md +++ b/UNRELEASED.md @@ -55,3 +55,4 @@ Use [the changelog guidelines](/documentation/Versioning%20and%20changelog.md) t - Deprecated passing `attention` to the `status` prop on `Badge` in favor of `warning` ([#4658](https://github.com/Shopify/polaris-react/pull/4658)) - Deprecated `thumbnail` property for `Page` ([#4733](https://github.com/Shopify/polaris-react/pull/4733)) +- Deprecated `secondaryActions` property for `SkeletonPage` ([#4740](https://github.com/Shopify/polaris-react/pull/4740)) diff --git a/src/components/SkeletonPage/README.md b/src/components/SkeletonPage/README.md index 1394ee1bb45..9f4178744cd 100644 --- a/src/components/SkeletonPage/README.md +++ b/src/components/SkeletonPage/README.md @@ -63,7 +63,7 @@ Use placeholder content that will change when the page fully loads. This will co Use this component to compose a loading version of a page where the page title and header content are dynamic, meaning, the content changes. ```jsx - + @@ -115,7 +115,7 @@ Use this component to compose a loading version of a page where the page title a Use this component to compose a loading version of a page where the page title and header content are known and stay the same. ```jsx - + diff --git a/src/components/SkeletonPage/SkeletonPage.tsx b/src/components/SkeletonPage/SkeletonPage.tsx index 4e2f3e21c09..2dbf7771d7d 100644 --- a/src/components/SkeletonPage/SkeletonPage.tsx +++ b/src/components/SkeletonPage/SkeletonPage.tsx @@ -16,7 +16,7 @@ export interface SkeletonPageProps { narrowWidth?: boolean; /** Shows a skeleton over the primary action */ primaryAction?: boolean; - /** Number of secondary page-level actions to display */ + /** @deprecated Number of secondary page-level actions to display */ secondaryActions?: number; /** Shows a skeleton over the breadcrumb */ breadcrumbs?: boolean; @@ -35,6 +35,13 @@ export function SkeletonPage({ }: SkeletonPageProps) { const i18n = useI18n(); + if (process.env.NODE_ENV === 'development' && secondaryActions != null) { + // eslint-disable-next-line no-console + console.warn( + 'The secondaryActions prop from SkeletonPage has been deprecated', + ); + } + const className = classNames( styles.Page, fullWidth && styles.fullWidth,