Skip to content

Commit

Permalink
[Text] Undeprecate heading2xl variant (Shopify#11811)
Browse files Browse the repository at this point in the history
### WHY are these changes introduced?

Part of https://github.com/Shopify/polaris-internal/issues/1529

### WHAT is this pull request doing?

Undeprecates the `heading2xl` variant since it will be kept in the next
major version for mobile purposes.
  • Loading branch information
lgriffee committed Apr 2, 2024
1 parent 18a013a commit bb14b7b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .changeset/green-laws-crash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@shopify/polaris': patch
'polaris.shopify.com': patch
---

Undeprecated `heading2xl` variant in `Text` component
3 changes: 1 addition & 2 deletions polaris-react/src/components/Text/Text.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ type Tone =
type TextDecorationLine = 'line-through';

const deprecatedVariants: {[V in Variant]?: Variant} = {
heading2xl: 'headingXl',
heading3xl: 'headingXl',
heading3xl: 'heading2xl',
};
export interface TextProps {
/** Adjust horizontal alignment of text */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ const componentUnionTypeDeprecations: {
};
} = {
Text: {
Variant: ['heading2xl', 'heading3xl'],
Variant: ['heading3xl'],
},
};

Expand Down

0 comments on commit bb14b7b

Please sign in to comment.