-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMusicCard.tsx
More file actions
30 lines (28 loc) · 965 Bytes
/
MusicCard.tsx
File metadata and controls
30 lines (28 loc) · 965 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import MarqueeText from '@/components/MarqueeText';
type MusicCardProps = {
title: string;
artist: string;
reason: string;
onClick: (value: string) => void;
};
export function MusicCard({ title, artist, reason, onClick }: MusicCardProps) {
return (
<div className="bg-card flex flex-col rounded-lg border p-4">
<button
type="button"
onClick={() => onClick(title)}
className="hover:text-accent mb-1 w-full cursor-pointer text-left text-sm font-semibold transition-colors hover:underline"
>
<MarqueeText>{title}</MarqueeText>
</button>
<button
type="button"
onClick={() => onClick(artist)}
className="text-muted-foreground hover:text-accent mb-2 w-full cursor-pointer text-left text-xs transition-colors hover:underline"
>
<MarqueeText>{artist}</MarqueeText>
</button>
<p className="text-muted-foreground text-sm">{reason}</p>
</div>
);
}