-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathinterfaces.ts
126 lines (108 loc) · 2.33 KB
/
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
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
import type { BoxProps } from '@chakra-ui/react'
import type { IconType } from 'react-icons'
import {
CATEGORIES_URL_MAP,
TRIANGLE_VARIANTS,
URL_CATEGORIES_MAP,
} from '@/constants'
export interface NavLink {
name: string
href: string
}
export interface SocialLink {
name: string
href: string
Icon: IconType
}
export interface BlogCardInfo {
title: string
author?: string
date: string
content: string | React.ReactNode
href: string
}
export interface Link {
label: string
href?: string
}
type Lat = number
type Long = number
export interface EventFrontmatter {
title: string
location: string
startDate: string
endDate: string
imageSrc?: string
previewLinks?: Link[]
ctaLinks?: Link[]
youtube?: string
coordsOverride?: [Lat, Long]
mapLabel?: string
}
export interface EventPost {
frontmatter: EventFrontmatter
content: string
url: string
}
export interface Coordinates {
lat: Lat
lng: Long
}
export type Category = keyof typeof CATEGORIES_URL_MAP
export type CategoryUrl = keyof typeof URL_CATEGORIES_MAP
export interface BlogPostFrontmatter {
layout?: string
title: string
date: string
author: string
category: Category
image?: string
}
export interface BlogPostProps extends BoxProps {
frontmatter: BlogPostFrontmatter
content: string
availableURLs?: string[]
url: string
}
export interface BlogParams {
YYYY: string
MM: string
DD: string
post: string
}
export interface CategoryPath {
params: { category: CategoryUrl }
}
export interface PostPath {
params: { YYYY: string; MM: string; DD: string; post: string }
}
export interface PageParams {
params: { page: string }
}
export interface BlogProps {
allPostsData: BlogPostProps[]
page: number
totalPages: number
}
export type TriangleCoord = [number, number, number, string]
export type Variant = TriangleCoord[]
export interface TriangleVariants {
[key: string]: Variant
}
export interface TrianglePlacementProps {
left: string
top: string
rotate: string
color: string
}
export type VariantProps = TrianglePlacementProps[]
export type VariantName = keyof typeof TRIANGLE_VARIANTS
export interface UseCase {
imageSrc: string
title: string
description: string | React.ReactNode
learnMoreLink?: string
exampleLink?: string
triangleVariant: VariantName
mobileTriangleVariant?: VariantName
}