radio-station/app/components/station-player.tsx
Luke Bunselmeyer 40ceb32da0 - UI
- Created <StationPlayer>
  - Minor responsive styling tweaks
2023-05-07 14:46:30 -04:00

21 lines
732 B
TypeScript

import type { StationWithTags } from "~/models/station.server";
import type { ConvertDatesToStrings } from "~/utils";
export type StationPlayerProps = {
station: ConvertDatesToStrings<NonNullable<StationWithTags>>
};
export function StationPlayer({ station }: StationPlayerProps) {
return (
<div
className="fixed bottom-0 left-0 w-full h-[70px] px-4 py-2 z-50 flex justify-end content-center items-center gap-2"
data-theme="aqua">
<h3 className="text-xl">Now Playing: <strong>{station.name}</strong></h3>
<audio controls autoPlay src={station.streamUrl}>
Your browser does not support the audio element.
</audio>
</div>
);
}