Skip to content

Commit 457fb24

Browse files
authored
Merge pull request alim1496#7 from alim1496/fix/fix-misc-design-issues
fix several style bugs
2 parents 66e621b + f083143 commit 457fb24

2 files changed

Lines changed: 13 additions & 12 deletions

File tree

src/components/ProductCard.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,21 +51,22 @@ const ProductCard: FC<Product> = ({
5151
/>
5252
</Link>
5353
</div>
54-
<div className="px-8 pt-4">
54+
<div className="px-4 pt-4">
5555
<p className="text-gray-500 text-[14px] font-medium dark:text-white">
5656
{category}
5757
</p>
5858
<Link
59-
className="font-semibold hover:underline dark:text-white"
59+
className="font-semibold hover:underline dark:text-white overflow-hidden text-ellipsis whitespace-nowrap block"
6060
to={{ pathname: `/product/${id}` }}
61+
title={title}
6162
>
6263
{title}
6364
</Link>
6465
</div>
65-
<div className="px-8">
66+
<div className="px-4">
6667
<RatingStar rating={rating} />
6768
</div>
68-
<div className="flex items-center justify-between px-8 pb-4">
69+
<div className="flex flex-wrap items-center justify-between px-4 pb-4">
6970
{discountPercentage && (
7071
<PriceSection discountPercentage={discountPercentage} price={price} />
7172
)}
@@ -74,9 +75,9 @@ const ProductCard: FC<Product> = ({
7475
className="flex items-center space-x-2 hover:bg-blue-500 text-white py-2 px-4 rounded bg-pink-500"
7576
onClick={addCart}
7677
data-test="add-cart-btn"
78+
title="ADD TO CART"
7779
>
7880
<AiOutlineShoppingCart />
79-
<span>ADD TO CART</span>
8081
</button>
8182
</div>
8283
</div>

src/pages/SingleProduct.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -159,30 +159,30 @@ const SingleProduct: FC = () => {
159159
{product?.description} {lorem}
160160
</p>
161161
</div>
162-
<div className="flex flex-wrap items-center mt-4 mb-2 space-x-2">
162+
<div className="flex flex-wrap items-center mt-4 mb-2">
163163
<button
164164
type="button"
165-
className="flex items-center space-x-1 mb-2 hover:bg-pink-700 text-white p-2 rounded bg-pink-500"
165+
className="flex space-x-1 items-center mr-2 mb-2 hover:bg-pink-700 text-white py-2 px-4 rounded bg-pink-500"
166166
onClick={addCart}
167+
title="ADD TO CART"
167168
>
168169
<AiOutlineShoppingCart />
169-
<span>ADD TO CART</span>
170170
</button>
171171
<button
172172
type="button"
173-
className="flex items-center space-x-1 mb-2 bg-blue-500 text-white p-2 rounded hover:bg-blue-700"
173+
className="flex space-x-1 items-center mr-2 mb-2 bg-blue-500 text-white py-2 px-4 rounded hover:bg-blue-700"
174174
onClick={buyNow}
175+
title="BUY NOW"
175176
>
176177
<FaHandHoldingDollar />
177-
<span>BUY NOW</span>
178178
</button>
179179
<button
180180
type="button"
181-
className="flex items-center space-x-1 mb-2 bg-yellow-500 text-white p-2 rounded hover:bg-yellow-700"
181+
className="flex space-x-1 items-center mb-2 bg-yellow-500 text-white py-2 px-4 rounded hover:bg-yellow-700"
182182
onClick={addWishlist}
183+
title="ADD TO WISHLIST"
183184
>
184185
<MdFavoriteBorder />
185-
<span>ADD TO WISHLIST</span>
186186
</button>
187187
</div>
188188
</div>

0 commit comments

Comments
 (0)