aboutsummaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authorNoah Loomans <noahloomans@gmail.com>2018-02-23 15:06:20 +0100
committerNoah Loomans <noahloomans@gmail.com>2018-02-23 15:06:20 +0100
commita89aba671fd70f5ac100a9c893c39dc5e3792b8b (patch)
tree1f06e4dd7446dc00d20b6e84ae7926baa448ed8a /src/client
parenta345bd0f554ec83b5b994752f30dca9d09dc9e67 (diff)
Add a menu
Diffstat (limited to 'src/client')
-rw-r--r--src/client/react/components/container/Menu.js39
-rw-r--r--src/client/react/components/container/Search.js2
-rw-r--r--src/client/style/_component-search.scss14
-rw-r--r--src/client/style/index.scss2
-rw-r--r--src/client/views/index.jade4
5 files changed, 59 insertions, 2 deletions
diff --git a/src/client/react/components/container/Menu.js b/src/client/react/components/container/Menu.js
new file mode 100644
index 0000000..2e55fa1
--- /dev/null
+++ b/src/client/react/components/container/Menu.js
@@ -0,0 +1,39 @@
+/**
+ * Copyright (C) 2018 Noah Loomans
+ *
+ * This file is part of rooster.hetmml.nl.
+ *
+ * rooster.hetmml.nl is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * rooster.hetmml.nl is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with rooster.hetmml.nl. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+import React from 'react';
+import { Button, ButtonIcon } from 'rmwc/Button';
+import { SimpleMenu, MenuItem } from 'rmwc/Menu';
+
+class Menu extends React.Component {
+ render() {
+ return (
+ <SimpleMenu
+ handle={<Button><ButtonIcon use="more_vert" /></Button>}
+ >
+ <MenuItem>Cookies</MenuItem>
+ <MenuItem>Pizza</MenuItem>
+ <MenuItem>Icecream</MenuItem>
+ </SimpleMenu>
+ );
+ }
+}
+
+export default Menu;
diff --git a/src/client/react/components/container/Search.js b/src/client/react/components/container/Search.js
index 30ccad8..9c67667 100644
--- a/src/client/react/components/container/Search.js
+++ b/src/client/react/components/container/Search.js
@@ -29,6 +29,7 @@ import SearchIcon from 'react-icons/lib/md/search';
import { userFromMatch } from '../../lib/url';
import users from '../../users';
+import Menu from './Menu';
import Results from './Results';
import IconFromUserType from '../presentational/IconFromUserType';
@@ -160,6 +161,7 @@ class Search extends React.Component {
onBlur={this.onBlur}
autoComplete="off"
/>
+ <Menu />
</div>
<Results />
</div>
diff --git a/src/client/style/_component-search.scss b/src/client/style/_component-search.scss
index 4f67575..f5575ac 100644
--- a/src/client/style/_component-search.scss
+++ b/src/client/style/_component-search.scss
@@ -61,6 +61,20 @@
font-size: 16px;
outline: none;
}
+
+ .mdc-button {
+ height: 100%;
+ min-width: unset;
+ color: black;
+
+ &::before, &::after {
+ background-color: black;
+ }
+
+ i {
+ font-size: 24px;
+ }
+ }
}
&__results {
diff --git a/src/client/style/index.scss b/src/client/style/index.scss
index 0c48636..b74420c 100644
--- a/src/client/style/index.scss
+++ b/src/client/style/index.scss
@@ -18,8 +18,6 @@
*
*/
-@import "../../../node_modules/material-components-web/dist/material-components-web.min.css";
-
* {
box-sizing: border-box;
}
diff --git a/src/client/views/index.jade b/src/client/views/index.jade
index 069473b..1141624 100644
--- a/src/client/views/index.jade
+++ b/src/client/views/index.jade
@@ -19,6 +19,10 @@
extends layout
block head
+ link(rel='stylesheet',
+ href='https://fonts.googleapis.com/icon?family=Material+Icons')
+ link(rel='stylesheet',
+ href='https://unpkg.com/material-components-web@latest/dist/material-components-web.min.css')
link(rel='stylesheet', href='/bundle.css')
block content