-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
90 lines (82 loc) · 1.93 KB
/
types.ts
File metadata and controls
90 lines (82 loc) · 1.93 KB
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
/**
* Expresses the size of a two-dimensional object.
*/
export type Size = { w: number; h: number };
/**
* Expresses the position in a two-dimensional point.
*/
export type Position = { x: number; y: number };
/**
* Expresses the resolution of a grid.
*/
export type GridDimensions = { rows: number; cols: number };
/**
* Represents the possible breakpoint keys for responsive design.
* - "xs": Extra small
* - "sm": Small
* - "md": Medium
* - "lg": Large
* - "xl": Extra large
* - "2xl": Double extra large
*/
export type BreakpointKey = "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
/**
* Defines a mapping from each BreakpointKey to its corresponding value (e.g., a CSS width).
*/
export type Breakpoints = {
[key in BreakpointKey]: string;
};
/**
* Represents the metadata for a project.
*/
export interface ProjectMetadata {
title: string;
name: string;
description: string;
repo?: string;
heroImage: string;
featuredImage?: string;
headerImage?: string;
website?: string;
skills?: string[];
}
/**
* Represents a project with its slug, component, and metadata.
*/
export interface Project {
slug: string;
featured: boolean;
Component: React.ComponentType;
metadata: ProjectMetadata;
readmeMarkdown?: string;
}
/**
* Represents a project with its slug and metadata, no react component.
*
* Passing from server side to a client-side component a React.ComponentType is
* not allowed, therefore sometimes we are interested only in project metadata.
*/
export type ProjectInfo = Omit<Project, "Component">;
/**
* Represents the result of getting projects data.
*/
export interface ProjectsData {
projects: Project[];
count: number;
}
/**
* Represents a job experience entry.
*/
export type Job = {
company: string;
logo: string;
website?: string;
duration: string;
place: string;
title: string;
summary: string;
points: string[];
images?: string[];
skills: string[];
lengthy: boolean;
};