xref: /MusicFree/src/components/mediaItem/LyricItem.tsx (revision 5589cdf32b2bb0f641e5ac7bf1f6152cd6b9b70e)
139ac60f7S猫头猫import React from 'react';
21119c2eaS猫头猫import ListItem from '@/components/base/listItem';
339ac60f7S猫头猫import {ImgAsset} from '@/constants/assetsConst';
41119c2eaS猫头猫import TitleAndTag from './titleAndTag';
539ac60f7S猫头猫
639ac60f7S猫头猫interface IAlbumResultsProps {
739ac60f7S猫头猫    lyricItem: ILyric.ILyricItem;
839ac60f7S猫头猫    onPress?: (musicItem: ILyric.ILyricItem) => void;
939ac60f7S猫头猫}
1039ac60f7S猫头猫export default function LyricItem(props: IAlbumResultsProps) {
1139ac60f7S猫头猫    const {lyricItem, onPress} = props;
1239ac60f7S猫头猫
1339ac60f7S猫头猫    return (
1439ac60f7S猫头猫        <ListItem
151119c2eaS猫头猫            heightType="big"
16*5589cdf3S猫头猫            withHorizontalPadding
1739ac60f7S猫头猫            onPress={() => {
1839ac60f7S猫头猫                onPress?.(lyricItem);
191119c2eaS猫头猫            }}>
201119c2eaS猫头猫            <ListItem.ListItemImage
211119c2eaS猫头猫                uri={lyricItem.artwork}
221119c2eaS猫头猫                fallbackImg={ImgAsset.albumDefault}
2339ac60f7S猫头猫            />
241119c2eaS猫头猫            <ListItem.Content
251119c2eaS猫头猫                description={lyricItem.artist ?? ''}
261119c2eaS猫头猫                title={
271119c2eaS猫头猫                    <TitleAndTag
281119c2eaS猫头猫                        title={lyricItem.title}
291119c2eaS猫头猫                        tag={lyricItem.platform}
301119c2eaS猫头猫                    />
311119c2eaS猫头猫                }
321119c2eaS猫头猫            />
331119c2eaS猫头猫        </ListItem>
3439ac60f7S猫头猫    );
3539ac60f7S猫头猫}
36