Skip to content

Commit

Permalink
Merge pull request #92 from newfold-labs/redesign/bug-fixes
Browse files Browse the repository at this point in the history
Redesign - Removed unused imports and files
  • Loading branch information
ashrithapradeep authored Jun 7, 2023
2 parents 9b49b3e + ed58b10 commit e75ff8b
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 33 deletions.
2 changes: 1 addition & 1 deletion src/components/CaptiveRazorpay.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useEffect, useState } from "@wordpress/element";
import { __, sprintf } from "@wordpress/i18n";
import { Button, TextField, ToggleField, usePrevious } from "@yoast/ui-library";
import { Button, TextField, ToggleField } from "@yoast/ui-library";
import { ReactComponent as RazorPayBrand } from "../icons/brands/razorpay.svg";
/** @type {((key: string) => boolean)[]} */
const KeyChecks = [
Expand Down
4 changes: 2 additions & 2 deletions src/components/Payment.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const Payment = ({ notify, pushChanges, values, controls }) => {
const isSetupComplete = integrationStatus?.complete;
const environment = integrationStatus?.details?.environment;
return (
<div className="yst-border yst-p-6">
<div className="yst-border yst-rounded-md yst-p-6">
<div className="yst-flex yst-justify-between yst-mb-8">
<PaypalBrand />
{isInstalling ? (
Expand Down Expand Up @@ -101,7 +101,7 @@ const Payment = ({ notify, pushChanges, values, controls }) => {
"wp-module-ecommerce"
)}
</Title>
<div className="yst-flex yst-items-end yst-gap-2">
<div className="yst-flex yst-items-end yst-gap-2 yst-flex-wrap">
<VisaBrand />
<MasterCardBrand />
<AmexBrand />
Expand Down
2 changes: 1 addition & 1 deletion src/components/Razorpay.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const Razorpay = ({ notify }) => {
const isSetupComplete = integrationStatus?.complete;
const environment = integrationStatus?.details?.environment;
return (
<div className="yst-h-[174px] yst-border yst-h-174px yst-p-6">
<div className="yst-h-[174px] yst-border yst-rounded-md yst-h-174px yst-p-6">
<div className="yst-flex yst-justify-between yst-mb-8">
<RazorPayBrand />
{!isInstalling ? (
Expand Down
2 changes: 1 addition & 1 deletion src/components/Shipping.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const Shipping = ({ notify }) => {
const isSetupComplete = integrationStatus?.complete;
const environment = integrationStatus?.details?.environment;
return (
<div className="yst-h-[174px] yst-border yst-p-6">
<div className="yst-h-[174px] yst-border yst-rounded-md yst-p-6">
<div className="yst-flex yst-justify-between yst-mb-8">
<Shippo />
{!isInstalling ? (
Expand Down
29 changes: 13 additions & 16 deletions src/components/StoreInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
SelectField,
TextInput,
Spinner,
TextField,
} from "@yoast/ui-library";
import { useEffect, useState } from "react";
import useSWR from "swr";
Expand Down Expand Up @@ -88,32 +89,29 @@ const StoreInfo = ({ values, pushChanges, controls }) => {
)}
</div>
<div className="yst-mt-6">
<Label>{__("Address Line 1 *")}</Label>
<TextInput
<TextField
data-section="details"
name="woocommerce_store_address"
value={values.woocommerce_store_address}
className="yst-mt-2"
required
label={__("Address Line 1 *")}
/>
</div>
<div className="yst-mt-6">
<Label>{__("Address Line 2 (optional)")}</Label>
<TextInput
<TextField
data-section="details"
name="woocommerce_store_address_2"
value={values.woocommerce_store_address_2}
className="yst-mt-2"
label={__("Address Line 2 (optional)")}
/>
</div>
<div className="yst-mt-6 yst-flex">
<div className="yst-flex-1">
<Label>{__("City *")}</Label>
<TextInput
<TextField
data-section="details"
name="woocommerce_store_city"
value={values.woocommerce_store_city}
className="yst-mt-2"
label={__("City *")}
required
/>
</div>
Expand Down Expand Up @@ -145,24 +143,23 @@ const StoreInfo = ({ values, pushChanges, controls }) => {
</Select>
</div>
)}

<div className="yst-flex-1 yst-ml-8">
<Label>{__("Postal Code *")}</Label>
<TextInput
<TextField
data-section="details"
name="woocommerce_store_postcode"
value={values.woocommerce_store_postcode}
className="yst-mt-2"
label={__("Postal Code *")}
required
/>
</div>
</div>
<div className="yst-mt-6">
<Label>{__("Email")}</Label>
<TextInput
<TextField
data-section="details"
name="woocommerce_email_from_address"
value={values.woocommerce_email_from_address}
className="yst-mt-2"
label={__("Email")}
required
/>
</div>
<div className="yst-mt-6">
Expand Down
2 changes: 1 addition & 1 deletion src/icons/brands/venmo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 0 additions & 11 deletions src/services.js

This file was deleted.

0 comments on commit e75ff8b

Please sign in to comment.