aleph-product-card
Version:
Este es un paquete para pruebas de despliegue NPM
26 lines (25 loc) • 870 B
TypeScript
import { CSSProperties, ReactElement } from 'react';
import { OnChangeArgs, Product } from '../interfaces/Product';
export interface InitialValues {
count: number;
maxCount?: number;
}
export interface ProductCardProps {
product: Product;
children: (args: ProductCardHandlers) => ReactElement;
className?: string;
style?: CSSProperties;
onChange?: ({ product, count }: OnChangeArgs) => void;
value?: number;
initialValues?: InitialValues;
}
export interface ProductCardHandlers {
count: number;
isMaxCountReached: boolean;
maxCount?: number;
product: Product;
onIncreaseBy: (value: number) => void;
onReset: () => void;
}
declare const ProductCard: ({ children, product, className, style, onChange, value, initialValues }: ProductCardProps) => JSX.Element;
export default ProductCard;