mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-11 16:17:25 +02:00
Add Prettier Formatting (#258)
* Add Prettier formatting to source files and example files, and check that Prettier formatting is maintained on PRs * Remove trailing-comma as we are using Node 6 on Circle * Use latest Node 6 LTS version in Circle * Remove unused test
This commit is contained in:
parent
0cead4b6f9
commit
65421db62e
50 changed files with 1376 additions and 1350 deletions
|
@ -5,29 +5,25 @@
|
|||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
const React = require("react");
|
||||
const classNames = require("classnames");
|
||||
const React = require('react');
|
||||
const classNames = require('classnames');
|
||||
|
||||
class Container extends React.Component {
|
||||
render() {
|
||||
const containerClasses = classNames("container", this.props.className, {
|
||||
darkBackground: this.props.background === "dark",
|
||||
highlightBackground: this.props.background === "highlight",
|
||||
lightBackground: this.props.background === "light",
|
||||
paddingAll: this.props.padding.indexOf("all") >= 0,
|
||||
paddingBottom: this.props.padding.indexOf("bottom") >= 0,
|
||||
paddingLeft: this.props.padding.indexOf("left") >= 0,
|
||||
paddingRight: this.props.padding.indexOf("right") >= 0,
|
||||
paddingTop: this.props.padding.indexOf("top") >= 0
|
||||
const containerClasses = classNames('container', this.props.className, {
|
||||
darkBackground: this.props.background === 'dark',
|
||||
highlightBackground: this.props.background === 'highlight',
|
||||
lightBackground: this.props.background === 'light',
|
||||
paddingAll: this.props.padding.indexOf('all') >= 0,
|
||||
paddingBottom: this.props.padding.indexOf('bottom') >= 0,
|
||||
paddingLeft: this.props.padding.indexOf('left') >= 0,
|
||||
paddingRight: this.props.padding.indexOf('right') >= 0,
|
||||
paddingTop: this.props.padding.indexOf('top') >= 0,
|
||||
});
|
||||
let wrappedChildren;
|
||||
|
||||
if (this.props.wrapper) {
|
||||
wrappedChildren = (
|
||||
<div className="wrapper">
|
||||
{this.props.children}
|
||||
</div>
|
||||
);
|
||||
wrappedChildren = <div className="wrapper">{this.props.children}</div>;
|
||||
} else {
|
||||
wrappedChildren = this.props.children;
|
||||
}
|
||||
|
@ -40,9 +36,9 @@ class Container extends React.Component {
|
|||
}
|
||||
|
||||
Container.defaultProps = {
|
||||
background: "transparent",
|
||||
background: 'transparent',
|
||||
padding: [],
|
||||
wrapper: true
|
||||
wrapper: true,
|
||||
};
|
||||
|
||||
module.exports = Container;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue