update: style of show button icon product card
This commit is contained in:
parent
6912f2605c
commit
2067a23756
|
|
@ -142,6 +142,13 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"VtFeaturedProducts": {
|
||||
"config": {
|
||||
"title": "best-seller"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"CartMismatchBanner": {
|
||||
"config": {
|
||||
|
|
|
|||
|
|
@ -237,15 +237,14 @@
|
|||
"title": "text-ui-fg-subtle text-[18px]",
|
||||
"price": "flex items-center gap-x-1 text-[#285A86] font-bold",
|
||||
"button": {
|
||||
"addToCart": "w-full h-[40px] bg-black text-white rounded-md",
|
||||
"moreInfo": "w-full h-[40px] border border-[#285A86] text-[#285A86] rounded-md"
|
||||
"addToCart": "w-fit h-[40px] bg-black text-white rounded-md",
|
||||
"moreInfo": "w-fit h-[40px] border border-[#285A86] text-[#285A86] rounded-md"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"CartMismatchBanner": {
|
||||
"config": {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import PreviewPrice from "@modules/products/components/product-preview/price"
|
|||
import { getProductPrice } from "@lib/util/get-product-price"
|
||||
import { addToCart } from "@lib/data/cart"
|
||||
import VtThumbnail from "../vt-thumbnail"
|
||||
|
||||
import { Plus, ChevronRight } from "@medusajs/icons"
|
||||
type ProductCardProps = {
|
||||
product: HttpTypes.StoreProduct
|
||||
badgeText?: string
|
||||
|
|
@ -67,6 +67,7 @@ export default function ProductCard({
|
|||
button: {
|
||||
addToCart: styles?.button?.addToCart || "flex-1",
|
||||
moreInfo: styles?.button?.moreInfo || "w-full",
|
||||
isShowIcon: styles?.button?.isShowIcon || true,
|
||||
},
|
||||
}
|
||||
|
||||
|
|
@ -123,7 +124,7 @@ export default function ProductCard({
|
|||
</div>
|
||||
|
||||
<Text className="txt-small text-ui-fg-subtle">{description}</Text>
|
||||
<Text className="mt-1 txt-small text-ui-fg-muted">
|
||||
<Text className="my-3 txt-small text-ui-fg-muted">
|
||||
Lieferzeit: {deliveryTime}
|
||||
</Text>
|
||||
|
||||
|
|
@ -133,9 +134,8 @@ export default function ProductCard({
|
|||
disabled={!inStock}
|
||||
variant="primary"
|
||||
className={classes.button.addToCart}
|
||||
data-testid="product-card-add-to-cart"
|
||||
>
|
||||
Add to cart
|
||||
Add to cart {classes.button.isShowIcon && <Plus />}
|
||||
</Button>
|
||||
<LocalizedClientLink
|
||||
href={`/products/${product.handle}`}
|
||||
|
|
@ -144,9 +144,8 @@ export default function ProductCard({
|
|||
<Button
|
||||
variant="secondary"
|
||||
className={classes.button.moreInfo}
|
||||
data-testid="product-card-more-info"
|
||||
>
|
||||
More Info
|
||||
More Info {classes.button.isShowIcon && <ChevronRight />}
|
||||
</Button>
|
||||
</LocalizedClientLink>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue