-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtypes.ts
55 lines (46 loc) · 1.03 KB
/
types.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
import { Dispatch, SetStateAction } from 'react'
export type Breakpoint = 'small' | 'medium' | 'large'
export interface AppApiResponseMeta {
total: number
}
export interface AppApiResponse {
data: []
meta: AppApiResponseMeta
}
export interface AppLocaleTranslation {
[index: string]: { [index: string]: string }
}
export interface ModalProps {
openState: [
boolean,
Dispatch<SetStateAction<boolean>>
]
children: JSX.Element
}
export interface Settings {
autoHeight: boolean
sort: string
columnBreakpoints: {[index in Breakpoint]: number}
renderingMode: 'grid' | 'columns'
perPage: number
}
export interface PageState {
page: number
setPage: Dispatch<SetStateAction<number>>
}
export interface SettingsFormProps {
account: string
settingsState: [
Settings,
Dispatch<SetStateAction<Settings>>
]
currentBreakpoint: Breakpoint
setCurrentColumnCount: CallableFunction
}
export interface PaginationProps {
meta: AppApiResponseMeta
pageState: PageState
locale: string
location: 'header' | 'footer'
settings: Settings
}