Run Prettier

This commit is contained in:
Frank Li 2017-07-10 16:38:35 -07:00
parent a7b5148e06
commit fbae29b0ff
29 changed files with 1311 additions and 987 deletions

View file

@ -7,22 +7,24 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/
const React = require('react');
const toSlug = require('./toSlug.js');
const React = require("react");
const toSlug = require("./toSlug.js");
const Header = React.createClass({
render() {
const slug = toSlug(this.props.toSlug || this.props.children);
const Heading = 'h' + this.props.level;
const Heading = "h" + this.props.level;
return (
<Heading {...this.props}>
<a className="anchor" name={slug}></a>
{this.props.children}
{' '}<a className="hash-link" href={'#' + slug}>#</a>
<a className="anchor" name={slug} />
{this.props.children}{" "}
<a className="hash-link" href={"#" + slug}>
#
</a>
</Heading>
);
},
}
});
module.exports = Header;