import { Box, Stack, Button, Text } from "@chakra-ui/react"; import { createRef } from "react"; import H5AudioPlayer from "react-h5-audio-player"; export default function AudioCardContent(props: { style: any resourcePath: string, resourceCaption: string, onPlay: (player: HTMLAudioElement) => void, onPause: () => void, onClose: () => void }) { const player = createRef() return ( <> props.onPlay(player.current?.audio.current!)} /> {props.resourceCaption} ) };