Skip to content

Commit

Permalink
Remove Text heading3xl deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
lgriffee committed Apr 1, 2024
1 parent 12e27bf commit 5055a7b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 20 deletions.
15 changes: 0 additions & 15 deletions polaris-react/src/components/Text/Text.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,6 @@ type Tone =

type TextDecorationLine = 'line-through';

const deprecatedVariants: {[V in Variant]?: Variant} = {
heading2xl: 'headingXl',
heading3xl: 'headingXl',
};
export interface TextProps {
/** Adjust horizontal alignment of text */
alignment?: Alignment;
Expand Down Expand Up @@ -95,17 +91,6 @@ export const Text = ({
visuallyHidden = false,
textDecorationLine,
}: TextProps) => {
if (
process.env.NODE_ENV === 'development' &&
variant &&
Object.prototype.hasOwnProperty.call(deprecatedVariants, variant)
) {
// eslint-disable-next-line no-console
console.warn(
`Deprecation: <Text variant="${variant}" />. The value "${variant}" will be removed in a future major version of Polaris. Use "${deprecatedVariants[variant]}" instead.`,
);
}

const Component = as || (visuallyHidden ? 'span' : 'p');

const className = classNames(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,7 @@ const componentUnionTypeDeprecations: {
[componentName: string]: {
[typeName: string]: string[];
};
} = {
Text: {
Variant: ['heading2xl', 'heading3xl'],
},
};
} = {};

export const getStaticProps: GetStaticProps<
Props,
Expand Down

0 comments on commit 5055a7b

Please sign in to comment.