diff --git a/README.md b/README.md
index c8651f01d..6088625b1 100644
--- a/README.md
+++ b/README.md
@@ -81,16 +81,7 @@ import ReactDOM from 'react-dom';
-### Object
-
-View contents
-
-* [`TreeView`](#treeview-)
-
-View contents
@@ -115,6 +106,7 @@ import ReactDOM from 'react-dom';
* [`Ticker`](#ticker)
* [`Toggle`](#toggle)
* [`Tooltip`](#tooltip)
+* [`TreeView`](#treeview-)
` element with the appropriate style. - -```css -.tree-element { - margin: 0; - position: relative; -} - -div.tree-element:before { - content: ''; - position: absolute; - top: 24px; - left: 1px; - height: calc(100% - 48px); - border-left: 1px solid gray; -} - -.toggler { - position: absolute; - top: 10px; - left: 0px; - width: 0; - height: 0; - border-top: 4px solid transparent; - border-bottom: 4px solid transparent; - border-left: 5px solid gray; - cursor: pointer; -} - -.toggler.closed { - transform: rotate(90deg); -} - -.collapsed { - display: none; -} -``` - -```jsx -function TreeView({ - data, - toggled = true, - name = null, - isLast = true, - isChildElement = false, - isParentToggled = true -}) { - const [isToggled, setIsToggled] = React.useState(toggled); - - return ( -
- {Array.isArray(data) ? '' : {v}: } - {data[v]} - {i === a.length - 1 ? '' : ','} -
- ) - )} - {Array.isArray(data) ? ']' : '}'} - {!isLast ? ',' : ''} -` element with the appropriate style. + +```css +.tree-element { + margin: 0; + position: relative; +} + +div.tree-element:before { + content: ''; + position: absolute; + top: 24px; + left: 1px; + height: calc(100% - 48px); + border-left: 1px solid gray; +} + +.toggler { + position: absolute; + top: 10px; + left: 0px; + width: 0; + height: 0; + border-top: 4px solid transparent; + border-bottom: 4px solid transparent; + border-left: 5px solid gray; + cursor: pointer; +} + +.toggler.closed { + transform: rotate(90deg); +} + +.collapsed { + display: none; +} +``` + +```jsx +function TreeView({ + data, + toggled = true, + name = null, + isLast = true, + isChildElement = false, + isParentToggled = true +}) { + const [isToggled, setIsToggled] = React.useState(toggled); + + return ( +
+ {Array.isArray(data) ? '' : {v}: } + {data[v]} + {i === a.length - 1 ? '' : ','} +
+ ) + )} + {Array.isArray(data) ? ']' : '}'} + {!isLast ? ',' : ''} +` element with the appropriate style.\n\n",
"tags": [
- "object",
"visual",
+ "object",
"state",
"recursion",
"advanced"
diff --git a/snippet_data/snippets.json b/snippet_data/snippets.json
index c939364f3..66944dd2a 100644
--- a/snippet_data/snippets.json
+++ b/snippet_data/snippets.json
@@ -36,6 +36,7 @@
"example": "ReactDOM.render(\r\n