Skip to content

Commit 743c6be

Browse files
committed
Fixed spacing issues
1 parent 0ac2f14 commit 743c6be

File tree

6 files changed

+6
-7
lines changed

6 files changed

+6
-7
lines changed

component.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ exports.handlers = {
2424
doclet.component.type = 'react'
2525
}
2626
doclet.kind = 'class'
27-
doclet.type = 'component'
27+
doclet.type = 'component'
2828
} else {
2929
if (path.extname(filePath) === '.vue') {
3030
const docGen = vueDocs.parse(filePath)

lib/load/fill-component-preview.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const fillComponentPreview = (text, mdParser) => {
1111
<div id="${uniqId}"></div>
1212
1313
<script>
14-
ReactDOM.createRoot(document.getElementById('${uniqId}')).render(ReactWrapper({
14+
ReactDOM.createRoot(document.getElementById('${uniqId}')).render(ReactWrapper({
1515
example: ${JSON.stringify(group)},
1616
uniqId: ${JSON.stringify(uniqId)},
1717
}));

lib/react-wrapper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ function (_React$Component) {
123123
var padding = 5; // buffer for any unstyled margins
124124

125125
if (this.iframeRef.current && this.iframeRef.current && this.iframeRef.current.contentDocument && this.iframeRef.current.contentDocument.body && this.iframeRef.current.contentDocument.body.offsetHeight !== 0 && this.iframeRef.current.contentDocument.body.offsetHeight !== height - padding) {
126-
this.setState({
126+
this.setState({
127127
height: this.iframeRef.current.contentDocument.body.offsetHeight + padding
128128
});
129129
}

publish.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ function buildMemberNav(items, itemHeading, itemsSeen, linktoFn) {
369369
if (itemsNav !== '') {
370370
var heading = itemHeading
371371
if (subCategoryName) {
372-
heading = heading === 'Globals' ? subCategoryName : heading + ' / ' + subCategoryName
372+
heading = heading === 'Globals' ? subCategoryName : heading + ' / ' + subCategoryName
373373
}
374374
nav += '<h3>' + heading + '</h3><ul>' + itemsNav + '</ul>'
375375
}

src/react-wrapper.jsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,10 @@ class Wrapper extends React.Component {
6767
computeHeight() {
6868
const { height } = this.state
6969
const padding = 5 // buffer for any unstyled margins
70-
7170
if (
7271
this.iframeRef.current
7372
&& this.iframeRef.current.contentDocument
74-
&& this.iframeRef.current.contentDocument.body
73+
&& this.iframeRef.current.contentDocument.body
7574
&& this.iframeRef.current.contentDocument.body.offsetHeight !== 0
7675
&& this.iframeRef.current.contentDocument.body.offsetHeight !== (height - padding)
7776
) {

tmpl/react-component.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ var uniqId = ['component', number].join('')
66
<div id='<?js= uniqId ?>'></div>
77

88
<script>
9-
ReactDOM.createRoot(document.getElementById('<?js= uniqId ?>')).render(ReactWrapper({
9+
ReactDOM.createRoot(document.getElementById('<?js= uniqId ?>')).render(ReactWrapper({
1010
example: <?js= JSON.stringify(example.code || null) ?>,
1111
uniqId: <?js= JSON.stringify(uniqId) ?>,
1212
}));

0 commit comments

Comments
 (0)