oscar-product-card
TypeScript icon, indicating that this package has built-in type declarations

1.0.0-rc • Public • Published

oscar-product-card

Este es un paquete de pruebas de despliegue de NPM

Oscar Caballero

Ejemplo

import { ProductCard, ProductImage, ProductButtons, ProductTitle } from '../components';

 <ProductCard product={product} style={{ backgroundColor: '#70D1F8' }} onChange={onProductCountChange} key={key} value={shoppingCart[product.id]?.count || 0} initialValues={{ count: 4, maxCount: 10 }}>
                        {({ reset, count, increaseBy, isMaxCountReached, maxCount }) => <>
                            <ProductImage />
                            <ProductTitle />
                            <ProductButtons />
                            <button onClick={reset}>reset</button>
                            <button onClick={() => increaseBy(-2)}>-2</button>
                            {(!isMaxCountReached && <button onClick={() => increaseBy(2)}>+2</button>
                            )}
                            <span>{count} - {maxCount}</span>
                        </>}
                    </ProductCard>

Package Sidebar

Install

npm i oscar-product-card

Weekly Downloads

4

Version

1.0.0-rc

License

MIT

Unpacked Size

157 kB

Total Files

51

Last publish

Collaborators

  • oscarcaballero