Skip to content

Commit 928d456

Browse files
committed
Fix some minor appearance things on the demo site
1 parent e66200e commit 928d456

File tree

1 file changed

+47
-52
lines changed
  • src/examples/basicExample

1 file changed

+47
-52
lines changed

src/examples/basicExample/app.js

Lines changed: 47 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ class App extends Component {
180180
alert( // eslint-disable-line no-alert
181181
`Info passed to the button generator:\n\n` +
182182
`node: {\n ${objectString}\n},\n` +
183-
`path: ${path.join(', ')},\n` +
183+
`path: [${path.join(', ')}],\n` +
184184
`treeIndex: ${treeIndex}`
185185
);
186186
};
@@ -210,57 +210,57 @@ class App extends Component {
210210
<section className={styles['main-content']}>
211211
<h3>Demo</h3>
212212

213-
<div style={{ height: 450 }}>
214-
<button onClick={this.expandAll}>
215-
Expand All
216-
</button>
217-
218-
<button onClick={this.collapseAll}>
219-
Collapse All
213+
<button onClick={this.expandAll}>
214+
Expand All
215+
</button>
216+
217+
<button onClick={this.collapseAll}>
218+
Collapse All
219+
</button>
220+
221+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
222+
<form
223+
style={{ display: 'inline-block' }}
224+
onSubmit={(event) => {
225+
event.preventDefault();
226+
}}
227+
>
228+
<label htmlFor="find-box">
229+
Search:&nbsp;
230+
231+
<input
232+
id="find-box"
233+
type="text"
234+
value={searchString}
235+
onChange={event => this.setState({ searchString: event.target.value })}
236+
/>
237+
</label>
238+
239+
<button
240+
type="button"
241+
disabled={!searchFoundCount}
242+
onClick={selectPrevMatch}
243+
>
244+
&lt;
220245
</button>
221246

222-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
223-
<form
224-
style={{ display: 'inline-block' }}
225-
onSubmit={(event) => {
226-
event.preventDefault();
227-
}}
247+
<button
248+
type="submit"
249+
disabled={!searchFoundCount}
250+
onClick={selectNextMatch}
228251
>
229-
<label htmlFor="find-box">
230-
Search:&nbsp;
231-
232-
<input
233-
id="find-box"
234-
type="text"
235-
value={searchString}
236-
onChange={event => this.setState({ searchString: event.target.value })}
237-
/>
238-
</label>
239-
240-
<button
241-
type="button"
242-
disabled={!searchFoundCount}
243-
onClick={selectPrevMatch}
244-
>
245-
&lt;
246-
</button>
247-
248-
<button
249-
type="submit"
250-
disabled={!searchFoundCount}
251-
onClick={selectNextMatch}
252-
>
253-
&gt;
254-
</button>
252+
&gt;
253+
</button>
255254

256-
<span>
257-
&nbsp;
258-
{searchFoundCount > 0 ? (searchFocusIndex + 1) : 0}
259-
&nbsp;/&nbsp;
260-
{searchFoundCount || 0}
261-
</span>
262-
</form>
255+
<span>
256+
&nbsp;
257+
{searchFoundCount > 0 ? (searchFocusIndex + 1) : 0}
258+
&nbsp;/&nbsp;
259+
{searchFoundCount || 0}
260+
</span>
261+
</form>
263262

263+
<div style={{ height: 450 }}>
264264
<SortableTree
265265
treeData={treeData}
266266
onChange={this.updateTreeData}
@@ -288,11 +288,6 @@ class App extends Component {
288288
/>
289289
</div>
290290

291-
<h3>Features</h3>
292-
<ul>
293-
<li>Works right out of the box, but is highly customizable</li>
294-
</ul>
295-
296291
<a href={githubUrl}>Documentation on Github</a>
297292

298293
<footer className={styles['site-footer']}>

0 commit comments

Comments
 (0)