Skip to content

Commit

Permalink
Clean up linkWrapperProps destructuring in Link component
Browse files Browse the repository at this point in the history
  • Loading branch information
kylesuss committed Jun 7, 2019
1 parent 192331a commit 6191f55
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/components/Link.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,8 @@ export function Link({ isButton, withArrow, containsIcon, LinkWrapper, children,

if (LinkWrapper) {
const StyledLinkWrapper = LinkA.withComponent(LinkWrapper);
const linkWrapperProps = { ...rest };
delete linkWrapperProps.inverse;
delete linkWrapperProps.nochrome;
delete linkWrapperProps.secondary;
delete linkWrapperProps.tertiary;
const { inverse, nochrome, secondary, tertiary, ...linkWrapperProps } = rest;

return <StyledLinkWrapper {...linkWrapperProps}>{content}</StyledLinkWrapper>;
}

Expand Down

0 comments on commit 6191f55

Please sign in to comment.