Skip to content

Commit

Permalink
feat(Link)!: remove and reset deprecated props (#1871)
Browse files Browse the repository at this point in the history
- restore `size` to available

This is used sparingly, but will be used more effectively in the future.

- remove `fullWidth` from component

This is a holdover from linkages to `Button`, so removing now that link
is its own component. Use utility classes to alter layout.
  • Loading branch information
booc0mtaco authored Mar 1, 2024
1 parent e0ad463 commit 552945a
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 26 deletions.
8 changes: 0 additions & 8 deletions src/components/Link/Link.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -525,11 +525,3 @@ button:where(.link--link) {
padding: 0 var(--eds-size-2);
}

/**
* Full-width link style
* A block link that fills 100% of the width of its container
* @deprecated ?
*/
.link--full-width {
width: 100%;
}
7 changes: 0 additions & 7 deletions src/components/Link/Link.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export default {
children: 'Link',
variant: 'link',
status: 'brand',
fullWidth: false,
size: 'lg',
href: 'https://go.czi.team/eds',
// stop link from navigating to another page so we can click the link for testing
Expand All @@ -38,12 +37,6 @@ export default {
disable: true,
},
},
fullWidth: {
control: 'boolean',
table: {
disable: true,
},
},
onClick: {
table: {
disable: true,
Expand Down
11 changes: 0 additions & 11 deletions src/components/Link/Link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,9 @@ export type LinkProps = LinkHTMLElementProps & {
* The link contents or label.
*/
children: ReactNode;
/**
* Toggles link that fills the full width of its container
* @deprecated
*/
fullWidth?: boolean;
'data-testid'?: string;
/**
* Link size inherits from the surrounding text.
*
* **Deprecated**. This will be removed in the next major version.
* @deprecated
*/
size?: Extract<Size, 'sm' | 'md' | 'lg'>;
} & VariantStatus;
Expand All @@ -48,7 +40,6 @@ export const Link = forwardRef<HTMLAnchorElement, LinkProps>(
variant = 'link',
status = 'brand',
size = 'lg',
fullWidth,
...rest
},
ref,
Expand All @@ -73,8 +64,6 @@ export const Link = forwardRef<HTMLAnchorElement, LinkProps>(
status === 'success' && styles['link--success'],
status === 'warning' && styles['link--warning'],
status === 'error' && styles['link--error'],
// Other options
fullWidth && styles['link--full-width'],
className,
);

Expand Down

0 comments on commit 552945a

Please sign in to comment.