build changes

This commit is contained in:
Belen Curcio
2020-10-02 12:59:50 -03:00
parent c5e5cbaa68
commit f536dab1a2
13 changed files with 63 additions and 97 deletions

View File

@@ -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>