diff --git a/package.json b/package.json
index ce3ad20cb..28048110f 100644
--- a/package.json
+++ b/package.json
@@ -36,6 +36,7 @@
"react-color": "^2.13.8",
"react-dom": "^16.2.0",
"react-helmet": "^5.2.0",
+ "react-highlight-words": "^0.10.0",
"react-redux": "^5.0.6",
"react-router": "^4.2.0",
"react-router-dom": "^4.2.2",
diff --git a/source/components/pages/RulesList.css b/source/components/pages/RulesList.css
index ac54b3c4a..5bed7ab75 100644
--- a/source/components/pages/RulesList.css
+++ b/source/components/pages/RulesList.css
@@ -1,4 +1,8 @@
#RulesList ul {
- margin: 0 auto;
+ margin: 1em auto;
max-width: 860px;
+ padding: 0;
+}
+#RulesList li {
+ list-style: none;
}
diff --git a/source/components/pages/RulesList.js b/source/components/pages/RulesList.js
index 7354ac8c4..7dcccf977 100644
--- a/source/components/pages/RulesList.js
+++ b/source/components/pages/RulesList.js
@@ -8,6 +8,7 @@ import Select from 'react-select'
import 'react-select/dist/react-select.css'
import Fuse from 'fuse.js'
import { Redirect } from 'react-router-dom'
+import Highlighter from 'react-highlight-words'
export default class RulesList extends Component {
render() {
@@ -41,37 +42,51 @@ class SearchBar extends React.Component {
this.fuse = new Fuse(rules, options)
}
state = {
- selectedOption: null
+ selectedOption: null,
+ inputValue: null
}
handleChange = selectedOption => {
this.setState({ selectedOption })
}
-
+ renderOption = option => (
+
+ )
filterOptions = (options, filter) => this.fuse.search(filter)
render() {
let { selectedOption } = this.state
if (selectedOption != null)
return
+
return (
-
+ <>
+