@@ -144,19 +144,21 @@ class Home extends Component {
144
144
< Container >
145
145
< div css = { [ sharedStyles . markdown , markdownStyles ] } >
146
146
< section
147
- className = "home-section"
148
- css = { {
149
- [ media . lessThan ( 'medium' ) ] : {
150
- marginTop : 0 ,
151
- marginBottom : 0 ,
152
- overflowX : 'auto' ,
153
- paddingTop : 30 ,
154
- WebkitOverflowScrolling : 'touch' ,
155
- position : 'relative' ,
156
- maskImage :
157
- 'linear-gradient(to right, transparent, white 10px, white 90%, transparent)' ,
147
+ css = { [
148
+ sectionStyles ,
149
+ {
150
+ [ media . lessThan ( 'medium' ) ] : {
151
+ marginTop : 0 ,
152
+ marginBottom : 0 ,
153
+ overflowX : 'auto' ,
154
+ paddingTop : 30 ,
155
+ WebkitOverflowScrolling : 'touch' ,
156
+ position : 'relative' ,
157
+ maskImage :
158
+ 'linear-gradient(to right, transparent, white 10px, white 90%, transparent)' ,
159
+ } ,
158
160
} ,
159
- } } >
161
+ ] } >
160
162
< div
161
163
css = { {
162
164
display : 'flex' ,
@@ -233,7 +235,7 @@ class Home extends Component {
233
235
borderBottom : `1 solid ${ colors . divider } ` ,
234
236
} }
235
237
/>
236
- < section className = "home-section" >
238
+ < section css = { sectionStyles } >
237
239
< div id = "examples" >
238
240
< div className = "example" >
239
241
< h3 > A Simple Component</ h3 >
@@ -385,18 +387,18 @@ export const pageQuery = graphql`
385
387
386
388
export default Home;
387
389
388
- // TODO This nasty CSS is required because 'docs/index.md' defines hard-coded class names.
389
- const markdownStyles = {
390
- '& .home-section': {
391
- marginTop: 20,
392
- marginBottom: 15,
390
+ const sectionStyles = {
391
+ marginTop: 20,
392
+ marginBottom: 15,
393
393
394
- [media.greaterThan('medium')]: {
395
- marginTop: 60,
396
- marginBottom: 65,
397
- },
394
+ [media.greaterThan('medium')]: {
395
+ marginTop: 60,
396
+ marginBottom: 65,
398
397
},
398
+ };
399
399
400
+ // TODO This nasty CSS is required because 'docs/index.md' defines hard-coded class names.
401
+ const markdownStyles = {
400
402
'& .example': {
401
403
marginTop: 40,
402
404
0 commit comments