mirror of
https://github.com/vercel/commerce.git
synced 2025-07-22 20:26:49 +00:00
build changes
This commit is contained in:
@@ -3,7 +3,15 @@ import { FC } from 'react'
|
||||
import s from './ProductView.module.css'
|
||||
import { Button } from '@components/ui'
|
||||
import { Swatch } from '@components/product'
|
||||
|
||||
import { Colors } from '@components/ui/types'
|
||||
interface ProductData {
|
||||
name: string
|
||||
images: any
|
||||
prices: any
|
||||
description: string
|
||||
colors?: any[]
|
||||
sizes?: any[]
|
||||
}
|
||||
interface Props {
|
||||
className?: string
|
||||
children?: any
|
||||
@@ -12,15 +20,15 @@ interface Props {
|
||||
|
||||
const ProductView: FC<Props> = ({ productData, className }) => {
|
||||
const rootClassName = cn(s.root, className)
|
||||
console.log(productData)
|
||||
const colors: Colors[] = ['pink', 'black', 'white']
|
||||
return (
|
||||
<div className={rootClassName}>
|
||||
<div className="absolute">
|
||||
<h1 className="px-8 py-2 bg-violet text-white font-bold text-3xl">
|
||||
{productData.title}
|
||||
{productData.name}
|
||||
</h1>
|
||||
<div className="px-6 py-2 pb-4 bg-violet text-white font-semibold inline-block">
|
||||
{productData.price}
|
||||
{productData.prices}
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex-1 h-full p-24">
|
||||
@@ -30,7 +38,7 @@ const ProductView: FC<Props> = ({ productData, className }) => {
|
||||
<section className="pb-4">
|
||||
<h2 className="uppercase font-medium">Color</h2>
|
||||
<div className="flex flex-row py-4">
|
||||
{productData.colors.map((c) => (
|
||||
{colors.map((c) => (
|
||||
<Swatch color={c} />
|
||||
))}
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user