design upgrade
This commit is contained in:
@@ -47,31 +47,31 @@ const AddAddress = ({
|
||||
return (
|
||||
<>
|
||||
<button
|
||||
className="border border-ui-border-base rounded-rounded p-5 min-h-[220px] h-full w-full flex flex-col justify-between"
|
||||
className="group flex h-full min-h-[200px] w-full flex-col justify-between rounded-2xl border border-dashed border-border p-6 text-left transition-colors hover:border-primary hover:bg-muted/50"
|
||||
onClick={open}
|
||||
data-testid="add-address-button"
|
||||
>
|
||||
<span className="text-base-semi">New address</span>
|
||||
<span className="font-display text-xl text-foreground">Nova adresa</span>
|
||||
<Plus />
|
||||
</button>
|
||||
|
||||
<Modal isOpen={state} close={close} data-testid="add-address-modal">
|
||||
<Modal.Title>
|
||||
<Heading className="mb-2">Add address</Heading>
|
||||
<Heading className="font-display text-2xl font-normal">Nova adresa</Heading>
|
||||
</Modal.Title>
|
||||
<form action={formAction}>
|
||||
<Modal.Body>
|
||||
<div className="flex flex-col gap-y-2">
|
||||
<div className="grid grid-cols-2 gap-x-2">
|
||||
<Input
|
||||
label="First name"
|
||||
label="Ime"
|
||||
name="first_name"
|
||||
required
|
||||
autoComplete="given-name"
|
||||
data-testid="first-name-input"
|
||||
/>
|
||||
<Input
|
||||
label="Last name"
|
||||
label="Prezime"
|
||||
name="last_name"
|
||||
required
|
||||
autoComplete="family-name"
|
||||
@@ -79,34 +79,34 @@ const AddAddress = ({
|
||||
/>
|
||||
</div>
|
||||
<Input
|
||||
label="Company"
|
||||
label="Firma"
|
||||
name="company"
|
||||
autoComplete="organization"
|
||||
data-testid="company-input"
|
||||
/>
|
||||
<Input
|
||||
label="Address"
|
||||
label="Adresa"
|
||||
name="address_1"
|
||||
required
|
||||
autoComplete="address-line1"
|
||||
data-testid="address-1-input"
|
||||
/>
|
||||
<Input
|
||||
label="Apartment, suite, etc."
|
||||
label="Stan, sprat i sl."
|
||||
name="address_2"
|
||||
autoComplete="address-line2"
|
||||
data-testid="address-2-input"
|
||||
/>
|
||||
<div className="grid grid-cols-[144px_1fr] gap-x-2">
|
||||
<Input
|
||||
label="Postal code"
|
||||
label="Poštanski broj"
|
||||
name="postal_code"
|
||||
required
|
||||
autoComplete="postal-code"
|
||||
data-testid="postal-code-input"
|
||||
/>
|
||||
<Input
|
||||
label="City"
|
||||
label="Grad"
|
||||
name="city"
|
||||
required
|
||||
autoComplete="locality"
|
||||
@@ -114,7 +114,7 @@ const AddAddress = ({
|
||||
/>
|
||||
</div>
|
||||
<Input
|
||||
label="Province / State"
|
||||
label="Kanton / entitet"
|
||||
name="province"
|
||||
autoComplete="address-level1"
|
||||
data-testid="state-input"
|
||||
@@ -127,7 +127,7 @@ const AddAddress = ({
|
||||
data-testid="country-select"
|
||||
/>
|
||||
<Input
|
||||
label="Phone"
|
||||
label="Telefon"
|
||||
name="phone"
|
||||
autoComplete="phone"
|
||||
data-testid="phone-input"
|
||||
@@ -135,7 +135,7 @@ const AddAddress = ({
|
||||
</div>
|
||||
{formState.error && (
|
||||
<div
|
||||
className="text-rose-500 text-small-regular py-2"
|
||||
className="text-rose-500 text-sm py-2"
|
||||
data-testid="address-error"
|
||||
>
|
||||
{formState.error}
|
||||
@@ -151,7 +151,7 @@ const AddAddress = ({
|
||||
className="h-10"
|
||||
data-testid="cancel-button"
|
||||
>
|
||||
Cancel
|
||||
Odustani
|
||||
</Button>
|
||||
<SubmitButton data-testid="save-button">Save</SubmitButton>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user