From 1f399c197533d33eaff71f4fef46d49f55d1533e Mon Sep 17 00:00:00 2001 From: James Allan Date: Mon, 29 Jul 2024 13:40:31 +1000 Subject: [PATCH] Add tooltips if the connect URL is empty --- .../settings/connect-stripe-account/index.js | 71 ++++++++++++++----- 1 file changed, 52 insertions(+), 19 deletions(-) diff --git a/client/settings/connect-stripe-account/index.js b/client/settings/connect-stripe-account/index.js index 5e18c114f2..2dee5ef09a 100644 --- a/client/settings/connect-stripe-account/index.js +++ b/client/settings/connect-stripe-account/index.js @@ -7,6 +7,7 @@ import CardBody from '../card-body'; import StripeBanner from 'wcstripe/components/stripe-banner'; import { recordEvent } from 'wcstripe/tracking'; import InlineNotice from 'wcstripe/components/inline-notice'; +import Tooltip from 'wcstripe/components/tooltip'; const CardWrapper = styled( Card )` max-width: 560px; @@ -58,6 +59,32 @@ const ConnectStripeAccount = ( { oauthUrl, oauthTestUrl } ) => { window.location.assign( oauthTestUrl ); }; + const connectButton = ( + + ); + + const connectTestButton = ( + + ); + return ( @@ -95,26 +122,32 @@ const ConnectStripeAccount = ( { oauthUrl, oauthTestUrl } ) => { } ) } ) } - { oauthUrl ? ( + { oauthUrl || oauthTestUrl ? ( - - + { ! oauthUrl ? ( + + { connectButton } + + ) : ( + connectButton + ) } + { ! oauthTestUrl ? ( + + { connectTestButton } + + ) : ( + connectTestButton + ) } ) : (