-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
Copy pathinterfaces.ts
38 lines (27 loc) · 894 Bytes
/
interfaces.ts
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
37
38
import { Props as ProductButtonProps } from "../components/ProductButtons";
import { Props as ProductCardProps } from "../components/ProductCard";
import { Props as ProductImgProps } from "../components/ProductImage";
import { Prop as ProductTitlesProps } from "../components/ProductTitle";
export interface Product {
id: string;
title: string;
img?: string;
}
export interface ProductContextProps {
counter: number;
increaseBy: (value: number) => void;
product: Product;
}
export interface ProductInCart extends Product {
counter: number;
}
export interface ProductCardsHOCProps {
({ children, product }: ProductCardProps): JSX.Element;
Title: (Props: ProductTitlesProps) => JSX.Element;
Image: (Props: ProductImgProps) => JSX.Element;
Buttons: (Props: ProductButtonProps) => JSX.Element;
}
export interface onChangeArg {
product: Product
counter: number
}