|
1 | 1 | <template> |
2 | 2 | <div class="grid-demo"> |
3 | | - <CodeBlock v-if="type === 'basic'" :compare="false"> |
| 3 | + <CodeBlock |
| 4 | + v-if="type === 'basic'" |
| 5 | + :compare="false" |
| 6 | + > |
4 | 7 | <template #preview> |
5 | | - <PUGrid :cols="3" gap="medium"> |
| 8 | + <PUGrid |
| 9 | + :cols="3" |
| 10 | + gap="medium" |
| 11 | + > |
6 | 12 | <PUGridItem> |
7 | 13 | Item 1 |
8 | 14 | </PUGridItem> |
|
19 | 25 | </template> |
20 | 26 | </CodeBlock> |
21 | 27 |
|
22 | | - <CodeBlock v-if="type === 'responsive'" :compare="false"> |
| 28 | + <CodeBlock |
| 29 | + v-if="type === 'responsive'" |
| 30 | + :compare="false" |
| 31 | + > |
23 | 32 | <template #preview> |
24 | | - <PUGrid :responsive="true" gap="large"> |
25 | | - <PUGridItem v-for="i in 4" :key="i"> |
| 33 | + <PUGrid |
| 34 | + :responsive="true" |
| 35 | + gap="large" |
| 36 | + > |
| 37 | + <PUGridItem |
| 38 | + v-for="i in 4" |
| 39 | + :key="i" |
| 40 | + > |
26 | 41 | Item {{ i }} |
27 | 42 | </PUGridItem> |
28 | 43 | </PUGrid> |
|
32 | 47 | </template> |
33 | 48 | </CodeBlock> |
34 | 49 |
|
35 | | - <CodeBlock v-if="type === 'span'" :compare="false"> |
| 50 | + <CodeBlock |
| 51 | + v-if="type === 'span'" |
| 52 | + :compare="false" |
| 53 | + > |
36 | 54 | <template #preview> |
37 | | - <PUGrid :cols="4" gap="medium"> |
| 55 | + <PUGrid |
| 56 | + :cols="4" |
| 57 | + gap="medium" |
| 58 | + > |
38 | 59 | <PUGridItem :col-span="2"> |
39 | 60 | Large item (2 columns) |
40 | 61 | </PUGridItem> |
|
54 | 75 | </template> |
55 | 76 | </CodeBlock> |
56 | 77 |
|
57 | | - <CodeBlock v-if="type === 'alignment'" :compare="false"> |
| 78 | + <CodeBlock |
| 79 | + v-if="type === 'alignment'" |
| 80 | + :compare="false" |
| 81 | + > |
58 | 82 | <template #preview> |
59 | | - <PUGrid :cols="3" gap="medium" alignment="center" justify="space-between"> |
| 83 | + <PUGrid |
| 84 | + :cols="3" |
| 85 | + gap="medium" |
| 86 | + alignment="center" |
| 87 | + justify="space-between" |
| 88 | + > |
60 | 89 | <PUGridItem alignment="start"> |
61 | 90 | Top aligned |
62 | 91 | </PUGridItem> |
|
73 | 102 | </template> |
74 | 103 | </CodeBlock> |
75 | 104 |
|
76 | | - <CodeBlock v-if="type === 'complex'" :compare="false"> |
| 105 | + <CodeBlock |
| 106 | + v-if="type === 'complex'" |
| 107 | + :compare="false" |
| 108 | + > |
77 | 109 | <template #preview> |
78 | | - <PUGrid :cols="6" :rows="4" gap="large"> |
79 | | - <PUGridItem :col-span="2" :row-span="2"> |
| 110 | + <PUGrid |
| 111 | + :cols="6" |
| 112 | + :rows="4" |
| 113 | + gap="large" |
| 114 | + > |
| 115 | + <PUGridItem |
| 116 | + :col-span="2" |
| 117 | + :row-span="2" |
| 118 | + > |
80 | 119 | Header |
81 | 120 | </PUGridItem> |
82 | 121 | <PUGridItem :col-span="4"> |
|
101 | 140 | </template> |
102 | 141 | </CodeBlock> |
103 | 142 |
|
104 | | - <CodeBlock v-if="type === 'masonry'" :compare="false"> |
| 143 | + <CodeBlock |
| 144 | + v-if="type === 'masonry'" |
| 145 | + :compare="false" |
| 146 | + > |
105 | 147 | <template #preview> |
106 | | - <PUGrid cols="repeat(auto-fill, minmax(250px, 1fr))" gap="medium"> |
| 148 | + <PUGrid |
| 149 | + cols="repeat(auto-fill, minmax(250px, 1fr))" |
| 150 | + gap="medium" |
| 151 | + > |
107 | 152 | <PUGridItem |
108 | 153 | v-for="i in 6" |
109 | 154 | :key="i" |
|
118 | 163 | </template> |
119 | 164 | </CodeBlock> |
120 | 165 |
|
121 | | - <CodeBlock v-if="type === 'gaps'" :compare="false"> |
| 166 | + <CodeBlock |
| 167 | + v-if="type === 'gaps'" |
| 168 | + :compare="false" |
| 169 | + > |
122 | 170 | <template #preview> |
123 | 171 | <div class="space-y-4"> |
124 | | - <PUGrid :cols="4" gap="small"> |
125 | | - <PUGridItem v-for="i in 4" :key="'small-' + i"> |
| 172 | + <PUGrid |
| 173 | + :cols="4" |
| 174 | + gap="small" |
| 175 | + > |
| 176 | + <PUGridItem |
| 177 | + v-for="i in 4" |
| 178 | + :key="'small-' + i" |
| 179 | + > |
126 | 180 | Item {{ i }} |
127 | 181 | </PUGridItem> |
128 | 182 | </PUGrid> |
129 | | - <PUGrid :cols="4" gap="medium"> |
130 | | - <PUGridItem v-for="i in 4" :key="'medium-' + i"> |
| 183 | + <PUGrid |
| 184 | + :cols="4" |
| 185 | + gap="medium" |
| 186 | + > |
| 187 | + <PUGridItem |
| 188 | + v-for="i in 4" |
| 189 | + :key="'medium-' + i" |
| 190 | + > |
131 | 191 | Item {{ i }} |
132 | 192 | </PUGridItem> |
133 | 193 | </PUGrid> |
134 | | - <PUGrid :cols="4" gap="large"> |
135 | | - <PUGridItem v-for="i in 4" :key="'large-' + i"> |
| 194 | + <PUGrid |
| 195 | + :cols="4" |
| 196 | + gap="large" |
| 197 | + > |
| 198 | + <PUGridItem |
| 199 | + v-for="i in 4" |
| 200 | + :key="'large-' + i" |
| 201 | + > |
136 | 202 | Item {{ i }} |
137 | 203 | </PUGridItem> |
138 | 204 | </PUGrid> |
|
0 commit comments