mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-24 11:26:31 +00:00
Adapt plugin headings to use normal links
This commit is contained in:
@@ -16,7 +16,7 @@ let Heading = React.createClass({
|
||||
},
|
||||
|
||||
render() {
|
||||
const { position, id } = this.props;
|
||||
const { position, children, id } = this.props;
|
||||
const className = classNames('Headings-Container', {
|
||||
'Headings-Right': (position !== 'left')
|
||||
});
|
||||
@@ -26,17 +26,17 @@ let Heading = React.createClass({
|
||||
<GitBook.ImportCSS href="gitbook/headings/headings.css" />
|
||||
|
||||
{position == 'left' ?
|
||||
<GitBook.Link className="Headings-Anchor-Left" href={`#${id}`}>
|
||||
<a className="Headings-Anchor-Left" href={`#${id}`}>
|
||||
<i className="fa fa-link" />
|
||||
</GitBook.Link>
|
||||
</a>
|
||||
: null}
|
||||
|
||||
{this.props.children}
|
||||
{children}
|
||||
|
||||
{position != 'left' ?
|
||||
<GitBook.Link className="Headings-Anchor-Right" href={`#${id}`}>
|
||||
<a className="Headings-Anchor-Right" href={`#${id}`}>
|
||||
<i className="fa fa-link" />
|
||||
</GitBook.Link>
|
||||
</a>
|
||||
: null}
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user