From 49dd641d082b082750017a941e8af29878a91dc3 Mon Sep 17 00:00:00 2001 From: Tracy Date: Sat, 13 Mar 2021 17:43:40 -0600 Subject: [PATCH 1/3] color --- src/frontend/src/Routes.js | 106 ++++++++++++------ src/frontend/src/components/BillDetailPage.js | 1 + .../src/components/DonorDetailPage.js | 6 +- src/frontend/src/components/DonutChart.js | 6 +- .../src/components/LegislatorDetailPage.js | 54 +++++---- src/frontend/src/components/SimpleTabs.js | 21 +++- 6 files changed, 131 insertions(+), 63 deletions(-) diff --git a/src/frontend/src/Routes.js b/src/frontend/src/Routes.js index b5b9ae3..fe50585 100644 --- a/src/frontend/src/Routes.js +++ b/src/frontend/src/Routes.js @@ -1,5 +1,5 @@ import React from 'react' -import { Tabs, Tab } from '@material-ui/core' +import { Tabs, Tab, makeStyles } from '@material-ui/core' import { Route, useHistory, Switch } from 'react-router-dom' import LegislatorsPage from 'components/LegislatorsPage' import Logo from 'components/Logo' @@ -18,8 +18,29 @@ import MonetizationOnRounded from '@material-ui/icons/MonetizationOnRounded' import SearchAll, { SearchResults } from 'components/SearchAll' import { TabWrapper } from 'components/SimpleTabs' import CustomLink from 'components/CustomLink' +import { MuiThemeProvider } from '@material-ui/core/styles' +import { billTheme, legTheme, donorTheme } from 'theme' + +const useStyles = makeStyles({ + billsTab: { + '&.MuiTab-textColorPrimary.Mui-selected': { + color: billTheme.palette.primary.main, + }, + }, + donorTab: { + '&.MuiTab-textColorPrimary.Mui-selected': { + color: donorTheme.palette.primary.main, + }, + }, + wrapper: { + '& .MuiTabs-indicator': { + backgroundColor: legTheme.palette.grey[600], + }, + }, +}) function Nav() { + const classes = useStyles() const history = useHistory() if ( history.location.pathname.includes('searchAll') || @@ -30,7 +51,7 @@ function Nav() { } return ( -