From 11d355c668602250834a5fb9e7faba10d5dcc8d8 Mon Sep 17 00:00:00 2001 From: Riddhiagrawal001 <50551695+Riddhiagrawal001@users.noreply.github.com> Date: Mon, 18 Mar 2024 17:17:30 +0530 Subject: [PATCH] fix: prod onboarding screen fix (#520) --- .../HSwitchProdOnboarding/ChooseConnector.res | 41 ++++++++++++++++--- .../ProdOnboardingLanding.res | 2 +- 2 files changed, 36 insertions(+), 7 deletions(-) diff --git a/src/screens/SelfServe/HSwitchProdOnboarding/ChooseConnector.res b/src/screens/SelfServe/HSwitchProdOnboarding/ChooseConnector.res index 0000a3bb9..db1ac116f 100644 --- a/src/screens/SelfServe/HSwitchProdOnboarding/ChooseConnector.res +++ b/src/screens/SelfServe/HSwitchProdOnboarding/ChooseConnector.res @@ -1,10 +1,27 @@ let headerTextStyle = "text-xl font-semibold text-grey-700" +let connectorNameStyle = "text-md font-semibold text-grey-700" let subTextStyle = "text-base font-normal text-grey-700 opacity-50" let subheaderText = "text-base font-semibold text-grey-700" @react.component let make = (~selectedConnector, ~setSelectedConnector, ~pageView, ~setPageView) => { - let getBlockColor = connector => - selectedConnector === connector ? "border border-blue-700 bg-blue-700 bg-opacity-10 " : "border" + let getBlockColor = connector => { + open ConnectorTypes + switch (selectedConnector, connector) { + | (Processors(selectedConnector), Processors(connector)) + if selectedConnector === connector => "border border-blue-700 bg-blue-700 bg-opacity-10 " + | (_, _) => "border" + } + } + + let selectedIconColor = connector => { + open ConnectorTypes + switch (selectedConnector, connector) { + | (Processors(selectedConnector), Processors(connector)) + if selectedConnector === connector => "selected" + | (_, _) => "nonselected" + } + } +
@@ -28,15 +45,27 @@ let make = (~selectedConnector, ~setSelectedConnector, ~pageView, ~setPageView) ->Array.mapWithIndex((connector, index) => { let connectorInfo = connector->ConnectorUtils.getConnectorInfo let connectorName = connector->ConnectorUtils.getConnectorNameString -
Int.toString} className={`py-4 px-6 flex flex-col gap-4 rounded-md cursor-pointer ${connector->getBlockColor}`} onClick={_ => setSelectedConnector(_ => connector)}> -
-
- String.toUpperCase} className="w-8 h-8" /> +
+
+
+ ConnectorUtils.getConnectorNameString->String.toUpperCase} + className="w-10 h-10" + /> + selectedIconColor} + size=20 + className="cursor-pointer !text-blue-800" + /> +
+

+ {connectorName->ConnectorUtils.getDisplayNameForConnector->React.string} +

{connectorInfo.description->React.string}

diff --git a/src/screens/SelfServe/HSwitchProdOnboarding/ProdOnboardingLanding.res b/src/screens/SelfServe/HSwitchProdOnboarding/ProdOnboardingLanding.res index d6a828d10..4abac35aa 100644 --- a/src/screens/SelfServe/HSwitchProdOnboarding/ProdOnboardingLanding.res +++ b/src/screens/SelfServe/HSwitchProdOnboarding/ProdOnboardingLanding.res @@ -65,7 +65,7 @@ module CheckListSection = { name={value->getIndexFromVariant < pageView->getIndexFromVariant ? "green-check" : "nonselected"} - size=14 + size=20 />

Int.toString}