-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathglobal.d.ts
More file actions
135 lines (113 loc) · 2.92 KB
/
Copy pathglobal.d.ts
File metadata and controls
135 lines (113 loc) · 2.92 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
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
127
128
129
130
131
132
133
134
135
/// <reference types="api.d.ts" />
import 'styled-components'
import { SVGProps, ReactElement, FC } from 'react'
import { NextPage } from 'next'
import { AxiosError } from 'axios'
export {}
declare module '*.svg' {
const ReactComponent: FC<SVGProps<SVGSVGElement>>
export default ReactComponent
}
declare global {
// STYLES: UX & THEME
interface GlowColors {
color1: string
color2?: string
color3?: string
color4?: string
}
interface IColors {
black: string
darkBlue1: string
darkBlue2: string
darkBlue3: string
darkBlue4: string
rgbBlack: string
rgbBlue: string
rgbLightGrey1: string
rgbLightGrey2: string
rgbMediumGrey1: string
rgbMediumGrey2: string
rgbMediumGrey3: string
rgbVeryDarkBlue1: string
rgbVeryDarkBlue2: string
rgbVeryDarkGrey3: string
rgbVeryLightGrey1: string
rgbVeryLightGrey2: string
rgbVeryLightGrey3: string
rgbVeryLightGrey4: string
rgbVeryLightGrey5: string
rgbWhite: string
white: string
}
interface IconsTheme {
iconGridTitleColorRgb: string
iconContainerBdrRgb: string
iconPlaceHolderBgRgb: string
iconFill: string
iconeNameBgRgb: string
iconeNameColor: string
}
interface IThemeProps {
maxWidth: string
borderRadius: string
fontsMono: string
foregroundRgb: string
backgroundStartRgb: string
backgroundEndRgb: string
primaryGlow: GlowColors
secondaryGlow: string
tileStartRgb: string
tileEndRgb: string
tileBorder: string
calloutRgb: string
calloutBorderRgb: string
cardRgb: string
cardBorderRgb: string
icons: IconsTheme
}
// NEXT: LAYOUTS AND PAGES
type GetLayoutCallback = (page: ReactElement) => ReactElement
type NestedLayoutCallback = (
parent: GetLayoutCallback,
child: GetLayoutCallback
) => GetLayoutCallback
type NextPageWithLayout<P = object, IP = P> = NextPage<P, IP> & {
getLayout?: GetLayoutCallback
getChildren?(): ReactElement[]
}
// API AXIOS RESPONSES
/** Contains a data object of type <i>GetCurrentDefaultObservationsResponse</i> */
type GetCurrentDefaultObservationsAxiosResponse = AxiosResponse<
GetCurrentDefaultObservationsResponse,
AxiosError
>
type GetObservationDetailsAxiosResponse = AxiosResponse<
GetDetailedForecatsResponse,
AxiosError
>
// API ROUTE REQUEST
type GetObservationDetailsRequestParams = Coordinates & {
cityName: string
}
// DYNAMICALLY DISPLAYED ICONS
export type LazyIconProps = PropsWithRef<SVGProps<SVGSVGElement>>
export type LazyIcon = FC<LazyIconProps>
export type LazyIconsGroup<IconType extends string> = Record<
IconType,
LazyIcon
>
export type IconID = {
iconGroupName: string
iconName: string
}
}
declare module 'styled-components' {
export interface DefaultTheme {
light: IThemeProps
dark: IThemeProps
breakpoints: {
[name in string]: number
}
}
}