diff --git a/PIG/index.html b/PIG/index.html
index 3a199c7587..b848ecddb1 100644
--- a/PIG/index.html
+++ b/PIG/index.html
@@ -1,7 +1,8 @@
-
-
-
-
+ PIG Component Explorer
+
+
+
+
diff --git a/Parse-Dashboard/index.html b/Parse-Dashboard/index.html
index db27073d53..52d3a0f2d4 100644
--- a/Parse-Dashboard/index.html
+++ b/Parse-Dashboard/index.html
@@ -1,7 +1,8 @@
-
-
-
-
+ Parse Dashboard
+
+
+
+
diff --git a/parse-interface-guide/PIG.react.js b/parse-interface-guide/PIG.react.js
index 5c8c977cc1..348d15ae1c 100644
--- a/parse-interface-guide/PIG.react.js
+++ b/parse-interface-guide/PIG.react.js
@@ -7,6 +7,7 @@
*/
import * as ComponentsMap from 'parse-interface-guide/ComponentsMap';
import { Link } from 'react-router';
+import Icon from 'components/Icon/Icon.react';
import PropsTable from 'parse-interface-guide/PropsTable.react';
import React from 'react';
import styles from 'parse-interface-guide/PIG.scss';
@@ -19,11 +20,35 @@ let PIGRow = ({ title, children }) =>
;
export default class PIG extends React.Component {
+ constructor() {
+ super();
+
+ this.state = {
+ query: ''
+ };
+ }
+
renderSidebar() {
let components = Object.keys(ComponentsMap);
return (
- {components.map((name) =>
{name})}
+
+
+ PIG Explorer
+
+
{
+ let query = e.target.value.trim();
+ this.setState({query});
+ }}/>
+ {components.map((name) => {
+ return name.toLowerCase().indexOf(this.state.query.toLowerCase()) !== -1
+ ?
{name}
+ : null;
+ })}
);
}
@@ -31,7 +56,7 @@ export default class PIG extends React.Component {
renderContent() {
let componentInfo = ComponentsMap[this.props.params.component];
if (!componentInfo) {
- return Unknown component
;
+ componentInfo = ComponentsMap[Object.keys(ComponentsMap)[0]];
}
let demos = componentInfo.demos || [];
return (
diff --git a/parse-interface-guide/PIG.scss b/parse-interface-guide/PIG.scss
index d724245421..3774271858 100644
--- a/parse-interface-guide/PIG.scss
+++ b/parse-interface-guide/PIG.scss
@@ -11,7 +11,7 @@
.sidebar {
position: fixed;
background: white;
- width: 200px;
+ width: 300px;
padding: 10px;
border-right: 1px solid #b0b8bf;
top: 0;
@@ -27,12 +27,34 @@
.active {
color: #1F62B1;
+ font-weight: bold;
}
}
+.iconWrap {
+ margin: 10px 0 20px 15px;
+}
+
+.iconLabel {
+ vertical-align: top;
+ position: relative;
+ top: 14px;
+ left: 16px;
+ font-size: 25px;
+}
+
+.searchField {
+ width: 230px;
+ height: 44px;
+ font-size: 20px;
+ padding: 0 10px;
+ border-radius: 5px;
+ margin: 0 0 30px 10px;
+}
+
.content {
- margin-left: 200px;
- padding: 10px;
+ margin-left: 300px;
+ padding: 20px 10px 10px 10px;
min-height: 100vh;
}