export type AudioPropsType = {
  src: string;
  caption?: string;
};

function Audio({ src, caption }: AudioPropsType) {
  return (
    <figure className='flex flex-col items-center justify-center gap-6'>
      {caption && <figcaption className='font-medium'>{caption}</figcaption>}
      <audio controls src={src}>
        Your browser does not support the
        <code>audio</code> element.
      </audio>
    </figure>
  );
}

export default Audio;
