-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtypes.tsx
99 lines (89 loc) · 1.71 KB
/
types.tsx
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
import { PortableTextBlock } from "sanity";
export interface ProjectProps {
_id: string;
name: string;
client: ClientProps;
published_at: string;
content?: (
| ImageBlockProps
| VideoBlockProps
| TitleBlockProps
| ParagraphBlockProps
)[];
slug: string;
tags?: TagProps[];
backgroundColor?: ColorProps;
primaryColor?: ColorProps;
secondaryColor?: ColorProps;
preview?: {
type?: "image" | "video";
image?: ImageProps;
video?: VideoProps;
};
cover?: {
type?: "image" | "video";
image?: ImageProps;
video?: VideoProps;
};
logo?: ImageProps;
logoWidth?: number;
logoHeight?: number;
}
export interface ImageBlockProps {
_key: string;
_type: "imageBlock";
title?: string;
image?: ImageProps;
start?: number;
width?: number;
}
export interface VideoBlockProps {
_key: string;
_type: "videoBlock";
title?: string;
video?: VideoProps;
start?: number;
width?: number;
controls?: boolean;
}
export interface TitleBlockProps {
_key: string;
_type: "titleBlock";
text?: string;
start?: number;
width?: number;
}
export interface ParagraphBlockProps {
_key: string;
_type: "paragraphBlock";
text?: PortableTextBlock;
start?: number;
width?: number;
}
export interface ColorProps {
_id: string;
hex: string;
}
export interface ImageProps {
_type: "image";
url?: string;
width?: number;
height?: number;
extension?: string;
}
export interface VideoProps {
_type: "mux.video";
playbackId?: string;
}
export interface ClientProps {
_id: string;
name: string;
logoList?: ImageProps;
logoWidthList?: number;
logoHeightList?: number;
}
export interface TagProps {
_id: string;
name: string;
slug: string;
}