Skip to content

Commit 014540b

Browse files
committed
fix: top padding of question card
1 parent 49ad70c commit 014540b

File tree

2 files changed

+35
-29
lines changed

2 files changed

+35
-29
lines changed

plugins/qeta/src/components/QuestionPage/VoteButtons.tsx

Lines changed: 34 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -101,41 +101,47 @@ export const VoteButtons = (props: {
101101
return (
102102
<React.Fragment>
103103
<Tooltip title={voteUpTooltip}>
104-
<IconButton
105-
aria-label="vote up"
106-
color={ownVote > 0 ? 'primary' : 'default'}
107-
disabled={own}
108-
size="small"
109-
onClick={voteUp}
110-
>
111-
<ArrowUpward />
112-
</IconButton>
104+
<span>
105+
<IconButton
106+
aria-label="vote up"
107+
color={ownVote > 0 ? 'primary' : 'default'}
108+
disabled={own}
109+
size="small"
110+
onClick={voteUp}
111+
>
112+
<ArrowUpward />
113+
</IconButton>
114+
</span>
113115
</Tooltip>
114116
<Typography variant="h6">{entity.score}</Typography>
115117
<Tooltip title={voteDownTooltip}>
116-
<IconButton
117-
aria-label="vote down"
118-
color={ownVote < 0 ? 'primary' : 'default'}
119-
disabled={own}
120-
size="small"
121-
onClick={voteDown}
122-
>
123-
<ArrowDownward />
124-
</IconButton>
118+
<span>
119+
<IconButton
120+
aria-label="vote down"
121+
color={ownVote < 0 ? 'primary' : 'default'}
122+
disabled={own}
123+
size="small"
124+
onClick={voteDown}
125+
>
126+
<ArrowDownward />
127+
</IconButton>
128+
</span>
125129
</Tooltip>
126130
{'correct' in props.entity && (props.question?.own || correct) && (
127131
<Box>
128132
<Tooltip title={correctTooltip}>
129-
<IconButton
130-
aria-label="mark correct"
131-
style={{
132-
color: correct ? theme.palette.success.main : undefined,
133-
}}
134-
size="small"
135-
onClick={props.question?.own ? toggleCorrectAnswer : undefined}
136-
>
137-
<Check />
138-
</IconButton>
133+
<span>
134+
<IconButton
135+
aria-label="mark correct"
136+
style={{
137+
color: correct ? theme.palette.success.main : undefined,
138+
}}
139+
size="small"
140+
onClick={props.question?.own ? toggleCorrectAnswer : undefined}
141+
>
142+
<Check />
143+
</IconButton>
144+
</span>
139145
</Tooltip>
140146
</Box>
141147
)}

plugins/qeta/src/utils/hooks.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export const useStyles = makeStyles(theme => {
9696
marginBottom: theme.spacing(2),
9797
},
9898
questionCard: {
99-
paddingTop: '0px',
99+
paddingTop: theme.spacing(1),
100100
},
101101
questionCardVote: {
102102
textAlign: 'center',

0 commit comments

Comments
 (0)