From 6191f557f0dc77d853bececfb496b63ac90d629e Mon Sep 17 00:00:00 2001 From: Kyle Suss Date: Thu, 6 Jun 2019 20:36:03 -0600 Subject: [PATCH] Clean up linkWrapperProps destructuring in Link component --- src/components/Link.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/components/Link.js b/src/components/Link.js index e45fd219..53bc294e 100644 --- a/src/components/Link.js +++ b/src/components/Link.js @@ -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 {content}; }