Added specific fontSizes for each card

This commit is contained in:
Clément Le Bihan
2023-09-20 11:52:03 +02:00
parent 6e3e73982f
commit 5b7cb6746d
3 changed files with 10 additions and 3 deletions
+4 -2
View File
@@ -5,6 +5,7 @@ type HomeMainSongCardProps = {
image: string;
title: string;
artist: string;
fontSize: number;
onPress: () => void;
};
@@ -61,7 +62,7 @@ const HomeMainSongCard = (props: HomeMainSongCardProps) => {
<Text
style={{
color: 'white',
fontSize: 46,
fontSize: props.fontSize,
fontWeight: 'bold',
}}
selectable={false}
@@ -71,7 +72,7 @@ const HomeMainSongCard = (props: HomeMainSongCardProps) => {
<Text
style={{
color: 'white',
fontSize: 16,
fontSize: props.fontSize * 0.4,
fontWeight: 'bold',
textAlign: 'center',
}}
@@ -89,6 +90,7 @@ const HomeMainSongCard = (props: HomeMainSongCardProps) => {
HomeMainSongCard.defaultProps = {
onPress: () => {},
fontSize: 16,
};
export default HomeMainSongCard;
+1 -1
View File
@@ -1,7 +1,7 @@
import Song from '../../models/Song';
import React from 'react';
import { Image, View } from 'react-native';
import { Pressable, Text, PresenceTransition, Icon, Button } from 'native-base';
import { Pressable, Text, PresenceTransition, Icon } from 'native-base';
import { Ionicons } from '@expo/vector-icons';
type SongCardInfoProps = {