1.0.0-rc • Published 8 months ago

ofda-product-card v1.0.0-rc

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

ofda-Product-Card

Este es un paquete de pruebas de despliegue de NPM

Oscar Diaz

Ejemplo

import {
  ProductCard,
  ProductImage,
  ProductTitle,
  ProductButtons,
} from 'ofda-product-card';
<ProductCard
  product={product}
  className="bg-dark text-white"
  initialValues={{
    count: 4,
    maxCount: 10,
  }}
>
  {({ reset, isMaxCountReached, increaseBy, count, maxCount }) => (
    <>
      <ProductImage className="custom-image" />
      <ProductTitle className="text-bold" />
      <ProductButtons className="custom-buttons" />

      <button onClick={reset}>Reset</button>
      <button onClick={() => increaseBy(-2)}>-2</button>
      {!isMaxCountReached && <button onClick={() => increaseBy(2)}>+2</button>}
      <span>
        {count} - {maxCount}
      </span>
    </>
  )}
</ProductCard>
1.0.0-rc

8 months ago

0.0.1

8 months ago