@@ -24,10 +24,10 @@ function Grid(props) {
24
24
const {
25
25
celled,
26
26
centered,
27
- container,
28
27
children,
29
28
className,
30
29
columns,
30
+ container,
31
31
divided,
32
32
doubling,
33
33
padded,
@@ -69,16 +69,6 @@ Grid.Row = GridRow
69
69
Grid . _meta = {
70
70
name : 'Grid' ,
71
71
type : META . TYPES . COLLECTION ,
72
- props : {
73
- celled : [ 'internally' ] ,
74
- columns : [ ...SUI . WIDTHS , 'equal' ] ,
75
- divided : [ 'vertically' ] ,
76
- padded : [ 'horizontally' , 'vertically' ] ,
77
- relaxed : [ 'very' ] ,
78
- reversed : [ 'computer' , 'computer vertically' , 'mobile' , 'mobile vertically' , 'tablet' , 'tablet vertically' ] ,
79
- textAlign : SUI . TEXT_ALIGNMENTS ,
80
- verticalAlign : SUI . VERTICAL_ALIGNMENTS ,
81
- } ,
82
72
}
83
73
84
74
Grid . propTypes = {
@@ -88,28 +78,28 @@ Grid.propTypes = {
88
78
/** A grid can have rows divided into cells. */
89
79
celled : PropTypes . oneOfType ( [
90
80
PropTypes . bool ,
91
- PropTypes . oneOf ( Grid . _meta . props . celled ) ,
81
+ PropTypes . oneOf ( [ 'internally' ] ) ,
92
82
] ) ,
93
83
94
84
/** A grid can have its columns centered. */
95
85
centered : PropTypes . bool ,
96
86
97
- /** A grid can be combined with a container to use avaiable layout and alignment */
98
- container : PropTypes . bool ,
99
-
100
87
/** Primary content. */
101
88
children : PropTypes . node ,
102
89
103
90
/** Additional classes. */
104
91
className : PropTypes . string ,
105
92
106
93
/** Represents column count per row in Grid. */
107
- columns : PropTypes . oneOf ( Grid . _meta . props . columns ) ,
94
+ columns : PropTypes . oneOf ( [ ...SUI . WIDTHS , 'equal' ] ) ,
95
+
96
+ /** A grid can be combined with a container to use avaiable layout and alignment. */
97
+ container : PropTypes . bool ,
108
98
109
99
/** A grid can have dividers between its columns. */
110
100
divided : PropTypes . oneOfType ( [
111
101
PropTypes . bool ,
112
- PropTypes . oneOf ( Grid . _meta . props . divided ) ,
102
+ PropTypes . oneOf ( [ 'vertically' ] ) ,
113
103
] ) ,
114
104
115
105
/** A grid can double its column width on tablet and mobile sizes. */
@@ -118,17 +108,19 @@ Grid.propTypes = {
118
108
/** A grid can preserve its vertical and horizontal gutters on first and last columns. */
119
109
padded : PropTypes . oneOfType ( [
120
110
PropTypes . bool ,
121
- PropTypes . oneOf ( Grid . _meta . props . padded ) ,
111
+ PropTypes . oneOf ( [ 'horizontally' , 'vertically' ] ) ,
122
112
] ) ,
123
113
124
114
/** A grid can increase its gutters to allow for more negative space. */
125
115
relaxed : PropTypes . oneOfType ( [
126
116
PropTypes . bool ,
127
- PropTypes . oneOf ( Grid . _meta . props . relaxed ) ,
117
+ PropTypes . oneOf ( [ 'very' ] ) ,
128
118
] ) ,
129
119
130
120
/** A grid can specify that its columns should reverse order at different device sizes. */
131
- reversed : PropTypes . oneOf ( Grid . _meta . props . reversed ) ,
121
+ reversed : PropTypes . oneOf ( [
122
+ 'computer' , 'computer vertically' , 'mobile' , 'mobile vertically' , 'tablet' , 'tablet vertically' ,
123
+ ] ) ,
132
124
133
125
/** A grid can have its columns stack on-top of each other after reaching mobile breakpoints. */
134
126
stackable : PropTypes . bool ,
@@ -137,10 +129,10 @@ Grid.propTypes = {
137
129
stretched : PropTypes . bool ,
138
130
139
131
/** A grid can specify its text alignment. */
140
- textAlign : PropTypes . oneOf ( Grid . _meta . props . textAlign ) ,
132
+ textAlign : PropTypes . oneOf ( SUI . TEXT_ALIGNMENTS ) ,
141
133
142
134
/** A grid can specify its vertical alignment to have all its columns vertically centered. */
143
- verticalAlign : PropTypes . oneOf ( GridColumn . _meta . props . verticalAlign ) ,
135
+ verticalAlign : PropTypes . oneOf ( SUI . VERTICAL_ALIGNMENTS ) ,
144
136
}
145
137
146
138
export default Grid
0 commit comments