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

0.0.2 • Public • Published

CA-Product Card

Este es un paquete de pruebsa de despliegue en NPM

Carlos Alonso

Ejemplo

import { ProductCard } from "car-product-card";

      <ProductCard
        className="bg-dark text-white"
        key={product.id}
        product={product}
        initialValues={{
          count: 4,
          maxCount: 10,
        }}
      >
        {({ reset, count, isMaxCountReached, maxCount, increaseBy }) => (
          <>
            <ProductCard.Image className="custom-image" />
            <ProductCard.Title className="text-bold" />
            <ProductCard.Buttons 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>

Readme

Keywords

Package Sidebar

Install

npm i car-product-card

Homepage

test

Weekly Downloads

0

Version

0.0.2

License

MIT

Unpacked Size

2.4 MB

Total Files

33

Last publish

Collaborators

  • caralo