diff --git a/src/components/Link.js b/src/components/Link.js index b1794d4e..e45fd219 100644 --- a/src/components/Link.js +++ b/src/components/Link.js @@ -135,7 +135,7 @@ const LinkButton = styled.button` ${linkStyles}; `; -export function Link({ isButton, withArrow, containsIcon, LinkWrapper, children, ...props }) { +export function Link({ isButton, withArrow, containsIcon, LinkWrapper, children, ...rest }) { const content = ( @@ -147,12 +147,19 @@ export function Link({ isButton, withArrow, containsIcon, LinkWrapper, children, if (LinkWrapper) { const StyledLinkWrapper = LinkA.withComponent(LinkWrapper); - return {content}; + const linkWrapperProps = { ...rest }; + delete linkWrapperProps.inverse; + delete linkWrapperProps.nochrome; + delete linkWrapperProps.secondary; + delete linkWrapperProps.tertiary; + return {content}; } + if (isButton) { - return {content}; + return {content}; } - return {content}; + + return {content}; } Link.propTypes = {