Skip to content

Commit ac08371

Browse files
feat(QuizQuestion,Quiz): support audio segment (#745)
1 parent 3b15213 commit ac08371

File tree

10 files changed

+793
-18
lines changed

10 files changed

+793
-18
lines changed

src/quiz-question/audio/audio.stories.tsx

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,19 +48,25 @@ export const WithAriaLabel: Story = {
4848
},
4949
};
5050

51-
export const WithCustomClass: Story = {
51+
export const WithAudioSegment: Story = {
5252
args: {
5353
src: "https://cdn.freecodecamp.org/curriculum/english/animation-assets/sounds/1.1-1.mp3",
54-
"aria-label": "Audio player",
55-
className: "mt-4",
54+
"aria-label": "Audio segment demo",
55+
startTime: 2,
56+
finishTime: 5,
5657
},
5758
parameters: {
5859
docs: {
60+
description: {
61+
story:
62+
"This story demonstrates the Audio component with `startTime` and `finishTime` props, which play only a segment of the audio instead of the full clip.",
63+
},
5964
source: {
6065
code: `<Audio
6166
src="https://cdn.freecodecamp.org/curriculum/english/animation-assets/sounds/1.1-1.mp3"
62-
aria-label="Audio player"
63-
className="mt-4"
67+
aria-label="Audio segment demo"
68+
startTime={2}
69+
finishTime={5}
6470
/>`,
6571
},
6672
},

0 commit comments

Comments
 (0)