From 1c9d61d7318b8d39108a4a984570aa2fbc728e3b Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Fri, 11 Dec 2015 01:19:48 +0000 Subject: [PATCH] dedicated search button --- src/components/views/rooms/SearchBar.js | 7 ++++++- src/skins/vector/css/molecules/SearchBar.css | 8 ++++++-- src/skins/vector/img/search-button.svg | 16 ++++++++++++++++ 3 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 src/skins/vector/img/search-button.svg diff --git a/src/components/views/rooms/SearchBar.js b/src/components/views/rooms/SearchBar.js index 7657cb14..08cd340c 100644 --- a/src/components/views/rooms/SearchBar.js +++ b/src/components/views/rooms/SearchBar.js @@ -39,14 +39,19 @@ module.exports = React.createClass({ onSearchChange: function(e) { if (e.keyCode === 13) { // on enter... - this.props.onSearch(this.refs.search_term.value, this.state.scope); + this.onSearch(); } }, + + onSearch: function() { + this.props.onSearch(this.refs.search_term.value, this.state.scope); + }, render: function() { return (
+
This Room
All Rooms
diff --git a/src/skins/vector/css/molecules/SearchBar.css b/src/skins/vector/css/molecules/SearchBar.css index 762984f1..71bc02f5 100644 --- a/src/skins/vector/css/molecules/SearchBar.css +++ b/src/skins/vector/css/molecules/SearchBar.css @@ -21,18 +21,22 @@ limitations under the License. align-items: center; } -.mx_SearchBar input { +.mx_SearchBar_input { display: inline block; border-radius: 3px; border: 1px solid #f0f0f0; font-size: 15px; padding: 9px; padding-left: 11px; - margin-right: 17px; width: auto; flex: 1 1 0; } +.mx_SearchBar_searchButton { + cursor: pointer; + margin-right: 10px; +} + .mx_SearchBar_button { display: inline; border: 0px; diff --git a/src/skins/vector/img/search-button.svg b/src/skins/vector/img/search-button.svg new file mode 100644 index 00000000..d92d0b8d --- /dev/null +++ b/src/skins/vector/img/search-button.svg @@ -0,0 +1,16 @@ + + + + icon_search + Created with Sketch. + + + + + + + + + + + \ No newline at end of file