Skip to content

Commit

Permalink
/product: bigger font for small screen. /admin: price input now has s…
Browse files Browse the repository at this point in the history
…tep of 0.01
  • Loading branch information
khanghy2130 committed Oct 15, 2024
1 parent 340165e commit 633e8f2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
1 change: 1 addition & 0 deletions app/routes/admin/ProductDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ export default function ProductDetails({ mode, updateFormState }: Props) {
className="mb-10 bg-bgColor2 p-2 text-textColor1"
type="number"
min={0}
step="0.01"
required
placeholder="Price"
name="price"
Expand Down
10 changes: 4 additions & 6 deletions app/routes/product.$productID/ProductDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,7 @@ export default function ProductDetails({ productInfo }: Props) {

return (
<div className="mt-4 p-3 sm:mt-0 sm:p-5">
<h1 className="text-2xl leading-none sm:text-3xl">
{productInfo.title}
</h1>
<h1 className="text-3xl leading-none">{productInfo.title}</h1>
<div className="mt-1 flex items-center">
<svg
xmlns="http://www.w3.org/2000/svg"
Expand All @@ -83,18 +81,18 @@ export default function ProductDetails({ productInfo }: Props) {
clipRule="evenodd"
/>
</svg>
<span className="ms-1 text-lg font-medium sm:text-xl">
<span className="ms-1 text-xl font-medium">
{productInfo.average_rating === 0
? "-"
: productInfo.average_rating.toFixed(1)}
</span>
</div>

<h2 className="mt-10 text-2xl font-bold sm:text-4xl">
<h2 className="mt-10 text-4xl font-bold">
${productInfo.price_with_discount?.toFixed(2)}
</h2>
{productInfo.discount > 0 ? (
<h3 className="text-lg sm:text-xl">
<h3 className="text-xl">
<span className="text-textColor2 line-through">
${productInfo.price.toFixed(2)}
</span>
Expand Down

0 comments on commit 633e8f2

Please sign in to comment.