-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Expand file tree
/
Copy pathinterfaces.ts
More file actions
36 lines (27 loc) · 932 Bytes
/
Copy pathinterfaces.ts
File metadata and controls
36 lines (27 loc) · 932 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import { Props as ProductButtonsProps } from '../components/ProductButtons';
import { Props as ProductCardProps } from '../components/ProductCard';
import { Props as ProductImageProps } from '../components/ProductImage';
import { Props as ProductTitleProps } from '../components/ProductTitle';
export interface Product {
id: string;
img?: string;
title: string;
}
export interface ProductContextProps {
counter: number;
product: Product;
increaseBy: ( value: number ) => void;
}
export interface ProductCardHOCProps {
({ children, product }: ProductCardProps ):JSX.Element,
Buttons: ( Props: ProductButtonsProps ) => JSX.Element,
Image: ( Props: ProductImageProps ) => JSX.Element,
Title: ( Props: ProductTitleProps ) => JSX.Element,
}
export interface onChangeArgs {
product: Product;
count: number;
}
export interface ProductInCart extends Product {
count: number
}