Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions UNRELEASED.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Original file line number Diff line number Diff line change
Expand Up @@ -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<AvatarProps | ThumbnailProps>
| React.SFC<React.SVGProps<SVGSVGElement>>;
Expand All @@ -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 ? <h1 className={styles.Title}>{title}</h1> : null;

const titleMetadataMarkup = titleMetadata ? (
Expand Down