xref: /MusicFree/src/components/mediaItem/LyricItem.tsx (revision 410a159129b1f6a7a1f44fde7bfad9a46f91e161)
1import React from 'react';
2import ListItem from '@/components/base/listItem';
3import {ImgAsset} from '@/constants/assetsConst';
4import TitleAndTag from './titleAndTag';
5
6interface IAlbumResultsProps {
7    lyricItem: ILyric.ILyricItem;
8    onPress?: (musicItem: ILyric.ILyricItem) => void;
9}
10export default function LyricItem(props: IAlbumResultsProps) {
11    const {lyricItem, onPress} = props;
12
13    return (
14        <ListItem
15            heightType="big"
16            withHorizonalPadding
17            onPress={() => {
18                onPress?.(lyricItem);
19            }}>
20            <ListItem.ListItemImage
21                uri={lyricItem.artwork}
22                fallbackImg={ImgAsset.albumDefault}
23            />
24            <ListItem.Content
25                description={lyricItem.artist ?? ''}
26                title={
27                    <TitleAndTag
28                        title={lyricItem.title}
29                        tag={lyricItem.platform}
30                    />
31                }
32            />
33        </ListItem>
34    );
35}
36