mirror of
https://github.com/qier222/YesPlayMusic.git
synced 2025-03-01 15:35:48 +08:00
23 lines
475 B
TypeScript
23 lines
475 B
TypeScript
const ArtistInline = ({
|
|
artists,
|
|
className,
|
|
}: {
|
|
artists: Artist[]
|
|
className?: string
|
|
}) => {
|
|
if (!artists) return <div></div>
|
|
|
|
return (
|
|
<div className={classNames('flex truncate', className)}>
|
|
{artists.map((artist, index) => (
|
|
<span key={artist.id}>
|
|
<span className="hover:underline">{artist.name}</span>
|
|
{index < artists.length - 1 ? ', ' : ''}
|
|
</span>
|
|
))}
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export default ArtistInline
|