Skip to content

Commit

Permalink
fix: overflow handling in polls
Browse files Browse the repository at this point in the history
  • Loading branch information
eswarclynn authored Jan 24, 2024
1 parent eb7ec3f commit 80e3ef3
Showing 1 changed file with 14 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,9 @@ export const QuestionCard = ({
</Box>
</Flex>

<Box css={{ maxHeight: showOptions ? '$80' : '0', transition: 'max-height 0.3s ease', overflowY: 'hidden' }}>
<Box
css={{ maxHeight: showOptions ? '$80' : '0', transition: 'max-height 0.3s ease', overflowY: 'auto', mb: '$4' }}
>
{type === QUESTION_TYPE.SINGLE_CHOICE ? (
<SingleChoiceOptions
key={index}
Expand Down Expand Up @@ -169,19 +171,18 @@ export const QuestionCard = ({
isStopped={pollState === 'stopped'}
/>
) : null}

{isLive && (
<QuestionActions
isValidVote={isValidVote}
onVote={handleVote}
response={localPeerResponse}
isQuiz={isQuiz}
incrementIndex={() => {
setCurrentIndex(curr => Math.min(totalQuestions, curr + 1));
}}
/>
)}
</Box>
{isLive && (
<QuestionActions
isValidVote={isValidVote}
onVote={handleVote}
response={localPeerResponse}
isQuiz={isQuiz}
incrementIndex={() => {
setCurrentIndex(curr => Math.min(totalQuestions, curr + 1));
}}
/>
)}
</Box>
);
};
Expand Down

1 comment on commit 80e3ef3

@vercel
Copy link

@vercel vercel bot commented on 80e3ef3 Jan 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.