diff --git a/UNRELEASED.md b/UNRELEASED.md index 5c68e1f7cfa..b7d95948991 100644 --- a/UNRELEASED.md +++ b/UNRELEASED.md @@ -53,3 +53,4 @@ Use [the changelog guidelines](/documentation/Versioning%20and%20changelog.md) t ### Deprecations - 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)) diff --git a/src/components/Page/components/Header/components/Title/Title.tsx b/src/components/Page/components/Header/components/Title/Title.tsx index 4ea1386278f..8771d129900 100644 --- a/src/components/Page/components/Header/components/Title/Title.tsx +++ b/src/components/Page/components/Header/components/Title/Title.tsx @@ -13,7 +13,7 @@ export interface TitleProps { subtitle?: string; /** Important and non-interactive status information shown immediately after the title. */ titleMetadata?: React.ReactNode; - /** thumbnail that precedes the title */ + /** @deprecated thumbnail that precedes the title */ thumbnail?: | React.ReactElement | React.SFC>; @@ -28,6 +28,11 @@ export function Title({ thumbnail, compactTitle, }: TitleProps) { + if (process.env.NODE_ENV === 'development' && thumbnail != null) { + // eslint-disable-next-line no-console + console.warn('The thumbnail prop from Page has been deprecated'); + } + const titleMarkup = title ?

{title}

: null; const titleMetadataMarkup = titleMetadata ? (