YesPlayMusic/packages/renderer/src/components/ArtistsInline.tsx
memorydream 08abf8229f
feat: updates (#1419)
* feat: TrackList 高亮播放中Track & Track 子标题(歌名翻译)

* fix: 不对id为0的歌手应用下划线

* feat: TrackList的Track支持深色模式

* fix: typo

* feat: 专辑页面的subtitle支持深色模式

* fix: typo

* feat: 在TrackList中高亮播放Track里的歌手信息
2022-03-18 14:13:56 +08:00

24 lines
530 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={classNames({ 'hover:underline': !!artist.id })}>
{artist.name}
</span>
{index < artists.length - 1 ? ', ' : ''}&nbsp;
</span>
))}
</div>
)
}
export default ArtistInline