Skip to content

Commit d8f14bf

Browse files
committed
changelog
1 parent e628ec8 commit d8f14bf

File tree

2 files changed

+7
-44
lines changed

2 files changed

+7
-44
lines changed

.changeset/wild-lizards-crash.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@shopify/polaris': patch
3+
---
4+
5+
Allow single value for columns. Add oneThird, oneHalf, twoThirds array options
Lines changed: 2 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,11 @@
1-
import {CancelSmallMinor} from '@shopify/polaris-icons';
21
import React from 'react';
32

4-
import {
5-
Page,
6-
Columns,
7-
Tag,
8-
Box,
9-
Bleed,
10-
AlphaStack,
11-
UnstyledButton,
12-
Inline,
13-
Text,
14-
Icon,
15-
} from '../src';
3+
import {Page} from '../src';
164

175
export function Playground() {
186
return (
197
<Page title="Playground">
20-
<Columns columns={17}>{genChildren(23)}</Columns>
21-
22-
<hr />
23-
24-
<Columns columns={{xs: 3, sm: 4, md: 5}}>{genChildren(6)}</Columns>
25-
26-
<hr />
27-
28-
<Columns columns={{xs: ['oneThird', 'twoThirds']}}>
29-
{genChildren(6)}
30-
</Columns>
31-
32-
<hr />
33-
34-
<Columns columns={{xs: ['twoThirds', 'oneThird']}}>
35-
{genChildren(6)}
36-
</Columns>
37-
38-
<hr />
39-
40-
<Columns columns={{xs: ['oneHalf', 'oneHalf']}}>{genChildren(6)}</Columns>
8+
{/* Add the code you want to test in here */}
419
</Page>
4210
);
4311
}
44-
45-
function genChildren(count: number) {
46-
const background =
47-
'repeating-linear-gradient(45deg, var(--p-background), var(--p-background) 5px, var(--p-decorative-four-surface) 5px, var(--p-decorative-four-surface) 10px';
48-
return Array.from({length: count}).map((_, index) => (
49-
<div key={index} style={{background}}>
50-
{index}
51-
</div>
52-
));
53-
}

0 commit comments

Comments
 (0)