From 3ad27d4b3fa3b69d2066f56c10a0ac0031ba0b45 Mon Sep 17 00:00:00 2001 From: ritiksharmarj Date: Tue, 12 Sep 2023 16:40:45 +0530 Subject: [PATCH] auth open in new tab --- client/common/Button.jsx | 7 +++++++ client/modules/User/components/SocialAuthButton.jsx | 1 + 2 files changed, 8 insertions(+) diff --git a/client/common/Button.jsx b/client/common/Button.jsx index d6dd18491e..bbb3a07747 100644 --- a/client/common/Button.jsx +++ b/client/common/Button.jsx @@ -165,6 +165,7 @@ const Button = ({ children, display, href, + target, kind, iconBefore, iconAfter, @@ -200,6 +201,7 @@ const Button = ({ as="a" aria-label={ariaLabel} href={href} + target={target} {...props} > {content} @@ -244,6 +246,7 @@ Button.defaultProps = { iconOnly: false, kind: kinds.primary, href: null, + target: null, 'aria-label': null, to: null, type: 'button' @@ -286,6 +289,10 @@ Button.propTypes = { * Specifying an href will use an to link to the URL */ href: PropTypes.string, + /** + * Specifying target open href URL in the new tab + */ + target: PropTypes.string, /* * An ARIA Label used for accessibility */ diff --git a/client/modules/User/components/SocialAuthButton.jsx b/client/modules/User/components/SocialAuthButton.jsx index 779c06e876..364045c355 100644 --- a/client/modules/User/components/SocialAuthButton.jsx +++ b/client/modules/User/components/SocialAuthButton.jsx @@ -73,6 +73,7 @@ function SocialAuthButton({ service, linkStyle, isConnected }) { } href={authUrls[service]} + target="_blank" > {loginLabel}