-
Notifications
You must be signed in to change notification settings - Fork 83
/
index.d.ts
79 lines (68 loc) · 3.1 KB
/
index.d.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
declare module 'react-grid-system' {
import * as React from 'react';
type Align = 'normal' | 'start' | 'center' | 'end' | 'stretch'
type Justify = 'start' | 'center' | 'end' | 'between' | 'around' | 'initial' | 'inherit';
type Direction = 'column' | 'row' | 'column-reverse' | 'row-reverse'
type Wrap = 'nowrap' | 'wrap' | 'reverse';
type ScreenClass = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl'| 'xxxl';
type ScreenClassMap<T> = Partial<Record<ScreenClass, T>>;
type Offsets = ScreenClassMap<number>;
type Orders = ScreenClassMap<number>;
type Push = ScreenClassMap<number>;
type Pull = ScreenClassMap<number>;
type ColProps = React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> & {
width?: "auto" | number | string,
debug?: boolean,
offset?: Offsets,
order?: Orders,
push?: Push,
pull?: Pull,
style?: object,
component?: (() => string) | string
} & ScreenClassMap<number | "content">;
type ContainerProps = React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> & {
fluid?: boolean,
style?: object,
component?: (() => string) | string
} & ScreenClassMap<boolean>;
type RowProps = React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> & {
align?: Align,
justify?: Justify,
direction?: Direction,
wrap?: Wrap,
debug?: boolean,
style?: object,
nogutter?: boolean,
component?: (() => string) | string,
gutterWidth?: number
}
type ClearFixProps = { children: React.ReactNode } & ScreenClassMap<boolean>;
type VisibleProps = { children: React.ReactNode } & ScreenClassMap<boolean>;
type HiddenProps = { children: React.ReactNode } & ScreenClassMap<boolean>;
type ScreenClassRenderProps = {
render?: (screenClass: ScreenClass) => Exclude<React.ReactNode, undefined>
}
type Configuration = {
breakpoints?: Array<number>,
containerWidths?: Array<number>,
gutterWidth?: number,
gridColumns?: number,
defaultScreenClass?: ScreenClass,
maxScreenClass?: ScreenClass
}
type ScreenClassProviderProps = {
children: React.ReactNode,
fallbackScreenClass?: ScreenClass,
useOwnWidth?: boolean
}
export function setConfiguration(configuration: Configuration): void
export function useScreenClass(elementRef?: React.MutableRefObject<any>): ScreenClass
export class Col extends React.Component<ColProps, any> { }
export class Container extends React.Component<ContainerProps, any> { }
export class Row extends React.Component<RowProps, any> { }
export class ClearFix extends React.Component<ClearFixProps, any> { }
export class Hidden extends React.Component<HiddenProps, any> { }
export class ScreenClassRender extends React.Component<ScreenClassRenderProps, any> { }
export class Visible extends React.Component<VisibleProps, any> { }
export class ScreenClassProvider extends React.Component<ScreenClassProviderProps, any> { }
}