diff --git a/src/components/Sidebar.js b/src/components/Sidebar.js index d5f91ef..7d7885f 100644 --- a/src/components/Sidebar.js +++ b/src/components/Sidebar.js @@ -2,45 +2,51 @@ // Copyright 2020 DXOS.org // -import clsx from 'clsx'; -import React from 'react'; -import { useHistory, useParams } from 'react-router'; +import clsx from "clsx"; +import React from "react"; +import { useHistory, useParams } from "react-router"; // import { useQuery } from '@apollo/react-hooks'; -import { makeStyles } from '@material-ui/core'; -import List from '@material-ui/core/List'; -import ListItem from '@material-ui/core/ListItem'; -import ListItemIcon from '@material-ui/core/ListItemIcon'; -import LinkIcon from '@material-ui/icons/ExitToApp'; -import ListItemText from '@material-ui/core/ListItemText'; +import { makeStyles } from "@material-ui/core"; +import List from "@material-ui/core/List"; +import ListItem from "@material-ui/core/ListItem"; +import ListItemIcon from "@material-ui/core/ListItemIcon"; +import LinkIcon from "@material-ui/icons/ExitToApp"; +import ListItemText from "@material-ui/core/ListItemText"; // import EXTENSIONS from '../gql/extensions.graphql'; // import { useQueryStatusReducer } from '../hooks'; -const useStyles = makeStyles(theme => ({ +const useStyles = makeStyles((theme) => ({ root: { - display: 'flex', + display: "flex", flex: 1, - flexDirection: 'column', - justifyContent: 'space-between' + flexDirection: "column", + justifyContent: "space-between", }, list: { - padding: 0 + padding: 0, + }, + + listItem: { + display: "flex", + alignItems: "center", + backgroundColor: theme.palette.background.secondary, }, icon: { minWidth: 40, - color: theme.palette.grey[500] + color: theme.palette.grey[500], }, selected: { - color: theme.palette.primary.main + color: theme.palette.primary.main, }, expand: { - flex: 1 - } + flex: 1, + }, })); const Sidebar = ({ modules: { services, settings } }) => { @@ -52,38 +58,55 @@ const Sidebar = ({ modules: { services, settings } }) => { // const extensions = extensionsData ? JSON.parse(extensionsData.extensions.json) : []; const extensions = []; - const isSelected = path => path === `/${module}`; + const isSelected = (path) => path === `/${module}`; const Modules = ({ modules }) => ( - + {modules.map(({ path, title, icon: Icon }) => ( - history.push(path)}> + history.push(path)} + className={classes.listItem} + > - + - + ))} ); const Extensions = ({ extensions }) => ( - + {extensions.map(({ url, title }) => { url = url - .replace('%HOST%', window.location.host) - .replace('%PORT%', window.location.port) - .replace('%PROTOCOL%', window.location.protocol); + .replace("%HOST%", window.location.host) + .replace("%PORT%", window.location.port) + .replace("%PROTOCOL%", window.location.protocol); return ( - { window.location = url; return true; }}> + { + window.location = url; + return true; + }} + > ); - } - )} + })} ); diff --git a/src/theme.js b/src/theme.js index 2739619..972dc53 100644 --- a/src/theme.js +++ b/src/theme.js @@ -68,6 +68,10 @@ export const createTheme = (theme) => secondary: "#18181A", paper: "#18181A", }, + text: { + primary: "#FBFBFB", + secondary: "#BDBCC3", + }, } : { primary: teal,