diff --git a/README.md b/README.md
index 0629303..bf8be23 100644
--- a/README.md
+++ b/README.md
@@ -22,48 +22,47 @@ e.g.: `` or `<... size={24} />`
Sizes can always be easily overridden by CSS.
#### Dynamically change icons
-**Search Bar Container example:**
+**Toggle icon example:**
```
-export default const SearchBar = ({ currentIcon, onChange, onClick }) => {
- return (
-
-
-
-
- );
-};
-
-class SearchBarContainer extends Component {
- constructor(props) {
- super(props);
+class ToggleIconContainer extends Component {
+ constructor() {
+ super();
this.state = {
- showingSuggestions: false
+ icon: 'x'
};
}
- toggleSuggestions = () => {
+ toggleIcon = (icon) => {
this.setState({
- showingSuggestions: !this.state.showingSuggestions
+ icon
});
}
- performSearch = (e) => {
- this.props.dispatch(searchFromInput(e.target.value));
- }
-
render() {
- const { showingSuggestions } = this.state;
- const { suggestionsList } = this.props;
- const currentClass = (showingSuggestions) ? 'search' : 'x ';
+ const { icon } = this.state;
return (
-
+
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+
+
);
}
}