This repository was archived by the owner on Mar 1, 2024. It is now read-only.
File tree 2 files changed +31
-0
lines changed
2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change 49
49
< / Grid .Col >
50
50
< / Grid .Row >
51
51
```
52
+
53
+ ### Column Offset
54
+
55
+ ``` jsx
56
+ < Grid .Row >
57
+ < Grid .Col width= {6 } offset= {3 }>
58
+ 2
59
+ < / Grid .Col >
60
+ < Grid .Col md= {6 } offsetMd= {3 }>
61
+ 4
62
+ < / Grid .Col >
63
+ < / Grid .Row >
64
+ ```
Original file line number Diff line number Diff line change @@ -18,6 +18,12 @@ type Props = {|
18
18
+ xl ? : number ,
19
19
+ xlAuto ? : boolean ,
20
20
+ auto ? : boolean ,
21
+ + offset ? : number ,
22
+ + offsetXs ? : number ,
23
+ + offsetSm ? : number ,
24
+ + offsetMd ? : number ,
25
+ + offsetLg ? : number ,
26
+ + offsetXl ? : number ,
21
27
| } ;
22
28
23
29
function GridCol ( {
@@ -35,6 +41,12 @@ function GridCol({
35
41
lgAuto,
36
42
xlAuto,
37
43
auto,
44
+ offset = 0 ,
45
+ offsetXs = 0 ,
46
+ offsetSm = 0 ,
47
+ offsetMd = 0 ,
48
+ offsetLg = 0 ,
49
+ offsetXl = 0 ,
38
50
} : Props ) : React . Node {
39
51
const classes = cn (
40
52
{
@@ -51,6 +63,12 @@ function GridCol({
51
63
[ `col-xl-${ xl } ` ] : xl ,
52
64
[ `col-xl-auto` ] : xlAuto ,
53
65
"col-auto" : auto ,
66
+ [ `offset-${ offset } ` ] : offset ,
67
+ [ `offset-xs-${ offsetXs } ` ] : offsetXs ,
68
+ [ `offset-sm-${ offsetSm } ` ] : offsetSm ,
69
+ [ `offset-md-${ offsetMd } ` ] : offsetMd ,
70
+ [ `offset-lg-${ offsetLg } ` ] : offsetLg ,
71
+ [ `offset-xl-${ offsetXl } ` ] : offsetXl ,
54
72
} ,
55
73
className
56
74
) ;
You can’t perform that action at this time.
0 commit comments