diff options
author | eug-vs <eug-vs@keemail.me> | 2020-10-08 22:43:30 +0300 |
---|---|---|
committer | eug-vs <eug-vs@keemail.me> | 2020-10-08 23:45:01 +0300 |
commit | 86a0796c859bbb0bd735fdc3bdc67d1687ddaf1c (patch) | |
tree | 9eb5826fdd92fe475a4c482d2bb0fc0dbb3ea17f | |
parent | 0930745ca23f881c97a3cf641c913466c692af64 (diff) | |
download | which-ui-86a0796c859bbb0bd735fdc3bdc67d1687ddaf1c.tar.gz |
feat: tweak description paddings
-rw-r--r-- | src/components/PollCard/PollCard.tsx | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/components/PollCard/PollCard.tsx b/src/components/PollCard/PollCard.tsx index d909b79..eb025f2 100644 --- a/src/components/PollCard/PollCard.tsx +++ b/src/components/PollCard/PollCard.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { makeStyles } from '@material-ui/core/styles'; -import { Card, CardActionArea } from '@material-ui/core/'; +import { Card, CardActionArea, Typography } from '@material-ui/core/'; import { Which, Poll } from 'which-types'; import { useSnackbar } from 'notistack'; @@ -44,8 +44,7 @@ const useStyles = makeStyles(theme => ({ transitionDuration: '0.5s' }, description: { - padding: '0px 16px 10px', - overflowWrap: 'break-word' + padding: theme.spacing(0.5, 2) } })); @@ -97,7 +96,11 @@ const PollCard: React.FC<PropTypes> = React.memo(({ poll, setPoll }) => { return ( <Card elevation={3}> <UserStrip user={author} info={date} /> - {poll.description && <div className={classes.description}>{poll.description}</div>} + {poll.description && ( + <Typography gutterBottom className={classes.description}> + {poll.description} + </Typography> + )} <div className={classes.media}> <CardActionArea onDoubleClick={handleVote('left')} className={classes.media}> <BackgroundImage src={left.url} /> |