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

1.0.0-rc • Public • Published

SL7-Product-Card

Este es un paquete de pruebas

Diego Caiza

ejemplo

import { ProductCard, ProductImage, ProductTitle, ProductButtons }
from ''
<ProductCard
          key={product.id}
          product={product}
          InitialValues={{
            count: 4,
            maxCount: 10,
          }}
        >
          {({maxCount, reset, increaseBy, count, isMaxCountReached}) => (
            <>
              <ProductImage  />
              <ProductTitle  />
              <ProductButtons  maxCount={maxCount} />
              <button onClick={reset}>reset</button>
              <button onClick={() => increaseBy(-2)}>-2</button>
              {/* si no llega al maxcount ocultar */}
              <button onClick={() => increaseBy(+2)}
              disabled={(isMaxCountReached)}
              >+2</button>
              <span>count:{count}</span>

            </>
          )}
        </ProductCard>


Readme

Keywords

Package Sidebar

Install

npm i sl7-product-card

Weekly Downloads

0

Version

1.0.0-rc

License

MIT

Unpacked Size

151 kB

Total Files

30

Last publish

Collaborators

  • slayercorp7