@ainias42/react-bootstrap-mobile 0.1.9 → 0.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,18 +13,21 @@ export type GridItemProps = RbmComponentProps<{
13
13
  lg?: number;
14
14
  xl?: number;
15
15
  xxl?: number;
16
+ print?: number;
16
17
  startXs?: number;
17
18
  startSm?: number;
18
19
  startMd?: number;
19
20
  startLg?: number;
20
21
  startXl?: number;
21
22
  startXxl?: number;
23
+ startPrint?: number;
22
24
  orderXs?: number;
23
25
  orderSm?: number;
24
26
  orderMd?: number;
25
27
  orderLg?: number;
26
28
  orderXl?: number;
27
29
  orderXxl?: number;
30
+ orderPrint?: number;
28
31
  }>;
29
32
 
30
33
  function GridItem({
@@ -38,18 +41,21 @@ function GridItem({
38
41
  lg,
39
42
  xl,
40
43
  xxl,
44
+ print,
41
45
  startXs,
42
46
  startMd,
43
47
  startSm,
44
48
  startLg,
45
49
  startXl,
46
50
  startXxl,
51
+ startPrint,
47
52
  orderXs,
48
53
  orderSm,
49
54
  orderMd,
50
55
  orderLg,
51
56
  orderXxl,
52
57
  orderXl,
58
+ orderPrint,
53
59
  }: GridItemProps) {
54
60
  // Variables
55
61
 
@@ -69,6 +75,9 @@ function GridItem({
69
75
  if (xxl) {
70
76
  classes.push(`item-xxl-${xxl}`);
71
77
  }
78
+ if (print) {
79
+ classes.push(`item-print-${print}`);
80
+ }
72
81
 
73
82
  if (startXs) {
74
83
  classes.push(`start-xs-${startXs}`);
@@ -88,6 +97,9 @@ function GridItem({
88
97
  if (startXxl) {
89
98
  classes.push(`start-xxl-${startXxl}`);
90
99
  }
100
+ if (startPrint) {
101
+ classes.push(`start-print-${startPrint}`);
102
+ }
91
103
 
92
104
  if (orderXs) {
93
105
  classes.push(`order-xs-${orderXs}`);
@@ -107,6 +119,9 @@ function GridItem({
107
119
  if (orderXxl) {
108
120
  classes.push(`order-xxl-${orderXxl}`);
109
121
  }
122
+ if (orderPrint) {
123
+ classes.push(`order-print-${orderPrint}`);
124
+ }
110
125
 
111
126
  // Refs
112
127
 
@@ -40,4 +40,27 @@ $breakpoints: $grid-breakpoints;
40
40
  }
41
41
  }
42
42
  }
43
+
44
+ @media print {
45
+ @for $i from 1 through $columns {
46
+ .item-print-#{$i} {
47
+ grid-column: auto / span $i;
48
+ }
49
+ }
50
+
51
+ // Start with `1` because `0` is and invalid value.
52
+ // Ends with `$columns - 1` because offsetting by the width of an entire row isn't possible.
53
+ @for $i from 1 through ($columns - 1) {
54
+ .start-print-#{$i} {
55
+ grid-column-start: $i;
56
+ }
57
+ }
58
+
59
+ // Add classes for reordering
60
+ @for $i from -10 through 10 {
61
+ .order-print-#{$i} {
62
+ order: $i;
63
+ }
64
+ }
65
+ }
43
66
  }