Completely updated React, fixed #11, (hopefully)

This commit is contained in:
2018-03-04 19:11:49 -05:00
parent 6e0afd6e2a
commit 34e5f5139a
13674 changed files with 333464 additions and 473223 deletions

View File

@@ -1,11 +1,17 @@
import * as React from 'react';
import { StandardProps } from '..';
import { StandardProps, Omit } from '..';
import { HiddenProps } from '../Hidden/Hidden';
import { Breakpoint } from '../styles/createBreakpoints';
export type GridItemsAlignment = 'flex-start' | 'center' | 'flex-end' | 'stretch' | 'baseline';
export type GridContentAlignment = 'stretch' | 'center' | 'flex-start' | 'flex-end' |'space-between' | 'space-around';
export type GridContentAlignment =
| 'stretch'
| 'center'
| 'flex-start'
| 'flex-end'
| 'space-between'
| 'space-around';
export type GridDirection = 'row' | 'row-reverse' | 'column' | 'column-reverse';
@@ -22,20 +28,21 @@ export type GridWrap = 'nowrap' | 'wrap' | 'wrap-reverse';
export type GridSize = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
export interface GridProps extends StandardProps<
React.HTMLAttributes<HTMLElement> & Partial<Record<Breakpoint, boolean | GridSize>>,
GridClassKey,
'hidden'
> {
component?: React.ReactType;
container?: boolean;
item?: boolean;
alignItems?: GridItemsAlignment;
export interface GridProps
extends StandardProps<
React.HTMLAttributes<HTMLElement> & Partial<Record<Breakpoint, boolean | GridSize>>,
GridClassKey,
'hidden'
> {
alignContent?: GridContentAlignment;
alignItems?: GridItemsAlignment;
component?: string | React.ComponentType<Omit<GridProps, StrippedProps>>;
container?: boolean;
direction?: GridDirection;
spacing?: GridSpacing;
hidden?: HiddenProps;
item?: boolean;
justify?: GridJustification;
spacing?: GridSpacing;
wrap?: GridWrap;
}
@@ -46,6 +53,7 @@ export type GridClassKey =
| 'direction-xs-column-reverse'
| 'direction-xs-row-reverse'
| 'wrap-xs-nowrap'
| 'wrap-xs-wrap-reverse'
| 'align-items-xs-center'
| 'align-items-xs-flex-start'
| 'align-items-xs-flex-end'
@@ -75,9 +83,27 @@ export type GridClassKey =
| 'grid-xs-9'
| 'grid-xs-10'
| 'grid-xs-11'
| 'grid-xs-12'
;
| 'grid-xs-12';
declare const Grid: React.ComponentType<GridProps>;
export default Grid;
type StrippedProps =
| 'classes'
| 'className'
| 'component'
| 'container'
| 'item'
| 'alignContent'
| 'alignItems'
| 'direction'
| 'spacing'
| 'hidden'
| 'justify'
| 'wrap'
| 'xs'
| 'sm'
| 'md'
| 'lg'
| 'xl';