Created
January 12, 2017 03:34
-
-
Save jonboiser/9067481f0ac608645bcf384862f80ee3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare module 'reflexbox' { | |
declare type Range6 = 0 | 1 | 2 | 3 | 4 | 5 | 6; | |
declare type Range12 = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12; | |
declare type BaseProps = { | |
auto?: boolean, | |
gutter?: number, | |
col?: Range12, | |
sm?: Range12, | |
md?: Range12, | |
lg?: Range12, | |
m?: Range6, | |
mb?: Range6, | |
ml?: Range6, | |
mr?: Range6, | |
mt?: Range6, | |
mx?: Range6, | |
my?: Range6, | |
p?: Range6, | |
p?: Range6, | |
pb?: Range6, | |
pl?: Range6, | |
pt?: Range6, | |
px?: Range6, | |
py?: Range6, | |
} | |
declare type FlexProps = { | |
column?: boolean, | |
justify?: 'center' | 'flex-end' | 'flex-start' | 'space-around' | 'space-between', | |
align?: 'stretch' | 'center' | 'baseline' | 'flex-start' | 'flex-end', | |
wrap?: boolean, | |
} | |
declare type GridProps = { | |
align: 'top' | 'middle' | 'bottom' | 'baseline', | |
} | |
declare class Box extends React$Component { | |
props: BaseProps; | |
} | |
declare class Flex extends React$Component { | |
props: BaseProps & FlexProps; | |
} | |
declare class Grid extends React$Component { | |
props: BaseProps & GridProps; | |
} | |
declare var exports: { | |
Box: typeof Box, | |
Flex: typeof Flex, | |
Grid: typeof Grid, | |
withReflex: Function, | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment