Skip to content

Commit

Permalink
Add missing rule for BodyLarge deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
connor-baer committed Oct 17, 2024
1 parent e9e0209 commit c8c0121
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/circuit-ui/components/BodyLarge/BodyLarge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { Body, type BodyProps } from '../Body/Body.js';

export type BodyLargeProps = Omit<BodyProps, 'size'>;
/**
* @deprecated Use the Body component in size `l` instead.
* @deprecated Use the Body component with `size="l"` instead.
*/
export const BodyLarge = forwardRef<HTMLParagraphElement, BodyLargeProps>(
(props, ref) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/circuit-ui/components/SubHeadline/SubHeadline.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export interface SubHeadlineProps extends HTMLAttributes<HTMLHeadingElement> {
}

/**
* @deprecated Use the Headline component in size `s` instead.
* @deprecated Use the Headline component with `size="s"` instead.
*/
export const SubHeadline = forwardRef<HTMLHeadingElement, SubHeadlineProps>(
(props, ref) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,16 @@ const components = [
},
{
name: 'SubHeadline',
alternative: 'Use the Headline component in size `s` instead.',
alternative: 'Use the Headline component with `size="s"` instead.',
},
{
name: 'Title',
alternative: 'Use the new Display component instead.',
},
{
name: 'BodyLarge',
alternative: 'Use the Body component with `size="l"` instead.',
},
];

export const noDeprecatedComponents = createRule({
Expand Down

0 comments on commit c8c0121

Please sign in to comment.