mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-10 07:37:19 +02:00
Run Prettier
This commit is contained in:
parent
a7b5148e06
commit
fbae29b0ff
29 changed files with 1311 additions and 987 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue