UNPKG

agp-product-card

Version:

### Este es un paquete de pruebas de despliegue en NPM

42 lines (41 loc) 1.3 kB
/// <reference types="react" /> import { Props as ProductoCardProps } from "../components/ProductCard"; import { Props as ProductoTItleProps } from "../components/ProductTitle"; import { Props as ProductoImageProps } from "../components/ProductImage"; import { Props as ProductoButtonsProps } from "../components/ProductButtons"; export interface Product { id: string; title: string; img?: string; } export interface ProductContextProps { product: Product; counter: number; increaseBy: (value: number) => void; maxCount?: number; } export interface ProductCardHOCProps { ({ children, product }: ProductoCardProps): JSX.Element; Title: (Props: ProductoTItleProps) => JSX.Element; Image: (Props: ProductoImageProps) => JSX.Element; Buttons: (Props: ProductoButtonsProps) => JSX.Element; } export interface OnChangeArgs { product: Product; count: number; } export interface ProductInCart extends Product { count: number; } export interface InitialValues { count?: number; maxCount?: number; } export interface ProductCardHandlers { count: number; isMaxCountReached: boolean; maxCount?: number; product: Product; increaseBy: (value: number) => void; reset: () => void; }