Skip to content

Commit ad54866

Browse files
authored
Small fixes (saleor#914)
1 parent 844762a commit ad54866

File tree

7 files changed

+11
-42
lines changed

7 files changed

+11
-42
lines changed

src/app/cart/CheckoutButton.tsx

-21
This file was deleted.

src/app/cart/CheckoutLink.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export const CheckoutLink = ({ disabled, checkoutId }: Props) => {
1313
aria-disabled={disabled}
1414
onClick={(e) => disabled && e.preventDefault()}
1515
href={`/checkout?checkout=${checkoutId}`}
16-
className="w-full rounded border border-transparent bg-pink-600 px-6 py-3 text-center font-medium text-gray-50 hover:bg-pink-500 aria-disabled:cursor-not-allowed aria-disabled:bg-pink-500 sm:col-start-2"
16+
className="w-full rounded border border-transparent bg-gray-900 px-6 py-3 text-center font-medium text-gray-50 hover:bg-gray-800 aria-disabled:cursor-not-allowed aria-disabled:bg-gray-500 sm:col-start-2"
1717
>
1818
Checkout
1919
</Link>

src/app/products/[slug]/AddButton.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export function AddButton({ disabled }: { disabled?: boolean }) {
1111
type="submit"
1212
aria-disabled={isButtonDisabled}
1313
onClick={(e) => isButtonDisabled && e.preventDefault()}
14-
className="h-12 w-full max-w-md items-center rounded-md bg-slate-700 px-6 py-3 text-base font-medium leading-6 text-white shadow transition duration-150 ease-in-out hover:bg-slate-600 disabled:cursor-not-allowed disabled:opacity-70 hover:disabled:bg-slate-700 aria-disabled:cursor-not-allowed aria-disabled:opacity-70 hover:aria-disabled:bg-slate-700"
14+
className="h-12 items-center rounded-md bg-gray-900 px-6 py-3 text-base font-medium leading-6 text-white shadow hover:bg-gray-800 disabled:cursor-not-allowed disabled:opacity-70 hover:disabled:bg-gray-700 aria-disabled:cursor-not-allowed aria-disabled:opacity-70 hover:aria-disabled:bg-gray-700"
1515
>
1616
{pending ? (
1717
<div className="inline-flex items-center">

src/app/products/[slug]/page.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,10 @@ export default async function Page(props: { params: { slug: string }; searchPara
118118
{firstImage && (
119119
<ProductImageWrapper alt={firstImage.alt ?? ""} width={1024} height={1024} src={firstImage.url} />
120120
)}
121-
<div className="flex flex-col justify-between pt-6 sm:px-6 sm:pt-0">
121+
<div className="flex flex-col pt-6 sm:px-6 sm:pt-0">
122122
<div>
123-
<h1 className="flex-auto text-3xl font-bold tracking-tight text-slate-900">{product?.name}</h1>
124-
<p className="text-sm font-medium text-gray-900">
123+
<h1 className="flex-auto text-3xl font-bold tracking-tight text-slate-900 mb-4">{product?.name}</h1>
124+
<p className="text-sm font-medium text-gray-900 mb-8">
125125
{selectedVariant?.pricing?.price?.gross
126126
? formatMoney(
127127
selectedVariant.pricing.price.gross.amount,
@@ -131,7 +131,7 @@ export default async function Page(props: { params: { slug: string }; searchPara
131131
</p>
132132

133133
{variants && <VariantSelector variants={variants} />}
134-
<div className="mt-4 space-y-6">
134+
<div className="mt-4 space-y-6 mt-8">
135135
<div dangerouslySetInnerHTML={{ __html: description }}></div>
136136
</div>
137137
<div className="mt-6 flex items-center">

src/ui/atoms/ProductImageWrapper.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ import NextImage, { type ImageProps } from "next/image";
22

33
export const ProductImageWrapper = (props: ImageProps) => {
44
return (
5-
<div className="overflow-hidden rounded-md border bg-slate-50 hover:border-slate-500">
5+
<div className="overflow-hidden rounded-md border bg-slate-50">
66
<NextImage
77
{...props}
8-
className="h-full w-full object-cover object-center p-4 transition-transform hover:scale-110"
8+
className="h-full w-full object-cover object-center p-4"
99
/>
1010
</div>
1111
);

src/ui/components/Footer.tsx

-10
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,6 @@ export function Footer() {
4040
))}
4141
</ul>
4242
</div>
43-
<div className="mt-16 md:mt-16 xl:mt-0">
44-
<h3 className="text-sm font-medium text-gray-900">Check it out</h3>
45-
<ul className="mt-4 space-y-4">
46-
<li className="text-sm">
47-
<a href="https://discord.gg/H52JTZAtSH" className="text-gray-500 hover:text-gray-600">
48-
Discord
49-
</a>
50-
</li>
51-
</ul>
52-
</div>
5343
</div>
5444

5545
<div className="flex flex-col justify-between border-t border-gray-200 py-10 sm:flex-row">

src/ui/components/VariantSelector.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export function VariantSelector(props: { variants: { id: string; name: string }[
4242
return (
4343
<fieldset className="my-4" role="radiogroup">
4444
<legend className="sr-only">Variants</legend>
45-
<div className="grid grid-cols-2 gap-3 sm:grid-cols-4">
45+
<div className="grid grid-cols-2 gap-3 sm:grid-cols-7">
4646
{variants.length > 1 &&
4747
variants.map((variant) => {
4848
return (
@@ -54,8 +54,8 @@ export function VariantSelector(props: { variants: { id: string; name: string }[
5454
}}
5555
className={clsx(
5656
searchParams.get("variant") === variant.id
57-
? "border-transparent bg-slate-600 text-white hover:bg-slate-500"
58-
: "border-slate-200 bg-white text-slate-900 hover:bg-slate-100",
57+
? "border-transparent bg-gray-900 text-white hover:bg-gray-800"
58+
: "border-gray-200 bg-white text-gray-900 hover:bg-gray-100",
5959
"flex items-center justify-center overflow-hidden text-ellipsis rounded border p-3 text-center text-sm font-semibold focus-within:outline focus-within:outline-2",
6060
)}
6161
role="radio"

0 commit comments

Comments
 (0)