cec-product-card
Version:
Esto es un paquete de pruebas en NPM
38 lines (34 loc) • 883 B
Markdown
# CEC-Product-Card
Esto es un paquete de pruebas en NPM
### Carlos Castro
```
import {
ProductCard,
ProductImage,
ProductTitle,
ProductButtons
} from 'cec-product-card'
```
```
<ProductCard
product={product}
initialValues={{
count: 4,
maxCount: 10
}}
>
{
({ reset, isMaxCountReached, increaseBy }) => (
<>
<ProductImage />
<ProductTitle />
<ProductButtons />
<button onClick={reset}>Reset</button>
{
(!isMaxCountReached && <button onClick={()=> increaseBy(2)}>+2</button> )
}
</>
)
}
</ProductCard>
```