Fixed number of lignes on DiscoveryCard
This commit is contained in:
@@ -38,7 +38,7 @@ const GoldenRatio = (props: GoldenRatioProps) => {
|
||||
>
|
||||
<GoldenRatioPanel
|
||||
direction={isPhone ? 'row-reverse' : 'column-reverse'}
|
||||
header={<HomeMainSongCard {...cards[3]!} />}
|
||||
header={<HomeMainSongCard numLinesHeader={1} {...cards[3]!} />}
|
||||
>
|
||||
<View style={{ display: 'flex', width: '100%', height: '100%' }}></View>
|
||||
</GoldenRatioPanel>
|
||||
|
||||
@@ -6,6 +6,7 @@ type HomeMainSongCardProps = {
|
||||
title: string;
|
||||
artist: string;
|
||||
fontSize: number;
|
||||
numLinesHeader: number;
|
||||
onPress: () => void;
|
||||
};
|
||||
|
||||
@@ -66,7 +67,7 @@ const HomeMainSongCard = (props: HomeMainSongCardProps) => {
|
||||
fontSize: props.fontSize,
|
||||
fontWeight: 'bold',
|
||||
}}
|
||||
numberOfLines={2}
|
||||
numberOfLines={props.numLinesHeader}
|
||||
selectable={false}
|
||||
>
|
||||
{props.title}
|
||||
@@ -94,6 +95,7 @@ const HomeMainSongCard = (props: HomeMainSongCardProps) => {
|
||||
HomeMainSongCard.defaultProps = {
|
||||
onPress: () => {},
|
||||
fontSize: 16,
|
||||
numLinesHeader: 2,
|
||||
};
|
||||
|
||||
export default HomeMainSongCard;
|
||||
|
||||
Reference in New Issue
Block a user