diff options
author | eug-vs <eug-vs@keemail.me> | 2020-06-24 01:03:34 +0300 |
---|---|---|
committer | eug-vs <eug-vs@keemail.me> | 2020-06-24 01:03:34 +0300 |
commit | cf3b9a1002d1971e5b867225baaca5f46039991b (patch) | |
tree | 407bfb7a9a32339da70a00bc2c5efd192232c084 /src | |
parent | fbdaa40e7ce585b65038835c05a283cec6f28d0e (diff) | |
download | which-ui-cf3b9a1002d1971e5b867225baaca5f46039991b.tar.gz |
refactor: use theme in styles
Diffstat (limited to 'src')
-rw-r--r-- | src/components/PollCard/PollCard.tsx | 11 | ||||
-rw-r--r-- | src/index.tsx | 3 |
2 files changed, 7 insertions, 7 deletions
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] } } }); |