Skip to content

Commit a291275

Browse files
fix(Audio,Transcript): let the components inherit parent width (#750)
1 parent b88762e commit a291275

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

src/quiz-question/audio/audio.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ export const Audio = ({
124124
{/* Transcript is added separately in a different component */}
125125
{/* eslint-disable-next-line jsx-a11y/media-has-caption */}
126126
<audio ref={audioRef} src={audioSrc} aria-label={ariaLabel}></audio>
127-
<div className="flex items-center gap-3 bg-background-primary px-2.5 py-2 w-full max-w-md rounded border-x-4 border-t-4 border-b-4 border-background-tertiary">
127+
<div className="flex items-center gap-3 bg-background-primary px-2.5 py-2 rounded border-x-4 border-t-4 border-b-4 border-background-tertiary">
128128
<button
129129
onClick={togglePlay}
130130
className="text-foreground-tertiary bg-transparent border-none p-0 scale-75 transition-transform"

src/quiz-question/quiz-question.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,10 @@ export const QuizQuestion = <AnswerT extends number | string>({
7474
</RadioGroup.Label>
7575

7676
{audioUrl && (
77-
<div className="ps-4">
77+
<div className="ps-4 w-full max-w-lg mt-3 space-y-3">
7878
<Audio
7979
src={audioUrl}
8080
aria-label={audioAriaLabel}
81-
className="mt-3"
8281
startTime={audioStartTime}
8382
finishTime={audioFinishTime}
8483
/>

src/quiz-question/transcript/transcript.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export const Transcript = ({ transcript }: TranscriptProps) => {
4242
Transcript
4343
</summary>
4444
<div
45-
className="mt-4 border border-foreground-primary [&_p]:px-3.5 [&_p]:py-2 [&_p]:mb-0 [&_p]:text-foreground-primary [&_p:nth-child(odd)]:bg-background-tertiary"
45+
className="mt-3 border border-foreground-primary [&_p]:px-2.5 [&_p]:py-2 [&_p]:mb-0 [&_p]:text-foreground-primary [&_p:nth-child(odd)]:bg-background-tertiary"
4646
dangerouslySetInnerHTML={{ __html: sanitizedTranscript }}
4747
/>
4848
</details>

0 commit comments

Comments
 (0)