Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 6a69112

Browse files
committed
Clean up
1 parent d3913d2 commit 6a69112

File tree

3 files changed

+20
-25
lines changed

3 files changed

+20
-25
lines changed

‎src/index.js

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ import PropTypes from 'prop-types'
44
const px = n => typeof n === 'number' ? n + 'px' : n
55

66
const width = props => ({
7-
// ['@media screen and (min-width:320px)']: {
8-
gridTemplateColumns: `repeat(auto-fit, minmax(${px(props.width)}, 1fr))`
9-
// }
7+
gridTemplateColumns: `repeat(auto-fit, minmax(${px(props.width)}, 1fr))`
108
})
119

1210
const gap = props => ({
@@ -22,8 +20,7 @@ const span = props => props.span ? ({
2220
}) : null
2321

2422
const Grid = styled.div([], {
25-
display: 'grid',
26-
maxWidth: '100%'
23+
display: 'grid'
2724
},
2825
width,
2926
gap,
@@ -46,8 +43,6 @@ Grid.defaultProps = {
4643
gap: 32
4744
}
4845

49-
Grid.Item = styled.div([], {
50-
maxWidth: '100%'
51-
}, span)
46+
Grid.Item = styled.div([], span)
5247

5348
export default Grid

‎test.js.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,24 @@ Generated by [AVA](https://ava.li).
99
> Snapshot 1
1010
1111
<div
12-
className="sc-bwzfXH hWsLvJ"
12+
className="sc-bwzfXH uTxCW"
13+
/>
14+
15+
## Grid.Item renders with span prop
16+
17+
> Snapshot 1
18+
19+
<div
20+
className="sc-bwzfXH bQiKoh"
21+
span={2}
1322
/>
1423

1524
## renders
1625

1726
> Snapshot 1
1827
1928
<div
20-
className="sc-bdVaJa juUzWM"
29+
className="sc-bdVaJa eHjUkg"
2130
width={320}
2231
/>
2332

@@ -26,7 +35,7 @@ Generated by [AVA](https://ava.li).
2635
> Snapshot 1
2736
2837
<div
29-
className="sc-bdVaJa jokDsC"
38+
className="sc-bdVaJa ljFsX"
3039
width={320}
3140
/>
3241

@@ -35,7 +44,7 @@ Generated by [AVA](https://ava.li).
3544
> Snapshot 1
3645
3746
<div
38-
className="sc-bdVaJa ecTFWC"
47+
className="sc-bdVaJa leJsmI"
3948
width={320}
4049
/>
4150

@@ -44,7 +53,7 @@ Generated by [AVA](https://ava.li).
4453
> Snapshot 1
4554
4655
<div
47-
className="sc-bdVaJa fupyDp"
56+
className="sc-bdVaJa KpEDw"
4857
width={320}
4958
/>
5059

@@ -53,7 +62,7 @@ Generated by [AVA](https://ava.li).
5362
> Snapshot 1
5463
5564
<div
56-
className="sc-bdVaJa ewMiHe"
65+
className="sc-bdVaJa fBOaNA"
5766
width="40em"
5867
/>
5968

@@ -62,15 +71,6 @@ Generated by [AVA](https://ava.li).
6271
> Snapshot 1
6372
6473
<div
65-
className="sc-bdVaJa juUzWM"
74+
className="sc-bdVaJa eHjUkg"
6675
width={320}
67-
/
68-
69-
## Grid.Item renders with span prop
70-
71-
> Snapshot 1
72-
73-
<div
74-
className="sc-bwzfXH vVdAr"
75-
span={2}
76-
/>
76+
/>

‎test.js.snap

3 Bytes
Binary file not shown.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /