forked from reactjs/ko.react.dev
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathContainer.js
More file actions
38 lines (31 loc) · 691 Bytes
/
Copy pathContainer.js
File metadata and controls
38 lines (31 loc) · 691 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* @emails react-core
* @flow
*/
import React from 'react';
import {media} from 'theme';
import type {Node} from 'react';
/**
* This component wraps page content sections (eg header, footer, main).
* It provides consistent margin and max width behavior.
*/
const Container = ({children}: {children: Node}) => (
<div
css={{
paddingLeft: 20,
paddingRight: 20,
marginLeft: 'auto',
marginRight: 'auto',
[media.greaterThan('medium')]: {
width: '90%',
},
[media.size('xxlarge')]: {
maxWidth: 1260,
},
}}>
{children}
</div>
);
export default Container;