Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const Link = props => {
const remainingProps = getPassThroughProps(
props,
Object.keys(Link.propTypes)
);
if (props.isExternal) {
return (
<a> getLinkStyles(props, theme)}
href={props.to}
target="_blank"
rel="noopener noreferrer"
{...remainingProps}
/>
);
}
return (</a>
const LinkButton = props => {
React.useEffect(() => {
warnDeprecatedComponent('LinkButton');
}, []);
const remainingProps = getPassThroughProps(
props,
Object.keys(LinkButton.propTypes)
);
if (props.isExternal) {
return (
event.preventDefault() : undefined}
disabled={props.isDisabled}
data-track-component="LinkButton"
aria-label={props.label}
{...remainingProps}
>