ex-ikon-components-library
v1.0.0
Published
Official ikon components library
Maintainers
Readme
DO-Product-Card
Este es un paquete de pruebas de despliegue en NPM
Ikon Technologies
Ejemplo
import {
ProductCard,
ProductImage,
ProductTitle,
ProductButtons
} from 'do-product-card';<ProductCard
product={ product }
initialValues={{
count: 6,
// maxCount: 10,
}}
>
{
({ reset, count, isMaxCountReached, maxCount, increaseBy }) => (
<>
<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>