From cf3b9a1002d1971e5b867225baaca5f46039991b Mon Sep 17 00:00:00 2001 From: eug-vs Date: Wed, 24 Jun 2020 01:03:34 +0300 Subject: refactor: use theme in styles --- src/components/PollCard/PollCard.tsx | 11 +++++------ src/index.tsx | 3 ++- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/components/PollCard/PollCard.tsx b/src/components/PollCard/PollCard.tsx index 9f89d9a..27f2203 100644 --- a/src/components/PollCard/PollCard.tsx +++ b/src/components/PollCard/PollCard.tsx @@ -10,8 +10,7 @@ import { import { Which, Poll } from 'which-types'; import PercentageBar from './PercentageBar'; -import {post} from '../../requests'; -import teal from "@material-ui/core/colors/teal"; +import { post } from '../../requests'; interface PropTypes { poll: Poll; @@ -38,12 +37,12 @@ const useStyles = makeStyles(theme => ({ position:'relative', margin: '0 auto', width: '100%', - height:16, - backgroundColor: teal[100] + height: theme.spacing(2), + backgroundColor: theme.palette.primary.light }, fillRateLine: { - height:16, - backgroundColor: teal[800], + height: theme.spacing(2), + backgroundColor: theme.palette.primary.main, transitionDuration: '0.5s' }, })); diff --git a/src/index.tsx b/src/index.tsx index 4e6779a..2b7c689 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -22,7 +22,8 @@ import ScrollTopArrow from './components/ScrollTopArrow/ScrollTopArrow'; const theme = createMuiTheme({ palette: { primary: { - main: teal[700] + main: teal[700], + light: teal[100] } } }); -- cgit v1.2.3