2018-02-12 09:28:31 -08:00
|
|
|
/**
|
|
|
|
* Copyright (c) 2014-present, Facebook, Inc.
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* This source code is licensed under the BSD-style license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree. An additional grant
|
|
|
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
|
|
*
|
|
|
|
* @flow
|
|
|
|
* @format
|
|
|
|
*/
|
|
|
|
|
|
|
|
import React from 'react';
|
|
|
|
import Toolbar from './Toolbar';
|
|
|
|
import './Page.css';
|
2018-02-12 10:25:02 -08:00
|
|
|
require('prismjs/themes/prism.css');
|
2018-02-12 09:28:31 -08:00
|
|
|
|
|
|
|
type Props = {|
|
|
|
|
children: any,
|
|
|
|
className?: string,
|
2018-02-12 10:25:02 -08:00
|
|
|
withSpacing?: boolean,
|
2018-02-12 09:28:31 -08:00
|
|
|
|};
|
|
|
|
|
|
|
|
export default (props: Props) => (
|
|
|
|
<div className={`Page ${props.className || ''}`}>
|
2018-02-13 11:27:34 -08:00
|
|
|
<Toolbar/>
|
2018-02-12 10:25:02 -08:00
|
|
|
<div className={`PageContent ${props.withSpacing ? 'withSpacing' : ''}`}>
|
|
|
|
{props.children}
|
|
|
|
</div>
|
2018-02-12 09:28:31 -08:00
|
|
|
</div>
|
|
|
|
);
|