Added specific fontSizes for each card
This commit is contained in:
@@ -5,6 +5,7 @@ type HomeMainSongCardProps = {
|
|||||||
image: string;
|
image: string;
|
||||||
title: string;
|
title: string;
|
||||||
artist: string;
|
artist: string;
|
||||||
|
fontSize: number;
|
||||||
onPress: () => void;
|
onPress: () => void;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -61,7 +62,7 @@ const HomeMainSongCard = (props: HomeMainSongCardProps) => {
|
|||||||
<Text
|
<Text
|
||||||
style={{
|
style={{
|
||||||
color: 'white',
|
color: 'white',
|
||||||
fontSize: 46,
|
fontSize: props.fontSize,
|
||||||
fontWeight: 'bold',
|
fontWeight: 'bold',
|
||||||
}}
|
}}
|
||||||
selectable={false}
|
selectable={false}
|
||||||
@@ -71,7 +72,7 @@ const HomeMainSongCard = (props: HomeMainSongCardProps) => {
|
|||||||
<Text
|
<Text
|
||||||
style={{
|
style={{
|
||||||
color: 'white',
|
color: 'white',
|
||||||
fontSize: 16,
|
fontSize: props.fontSize * 0.4,
|
||||||
fontWeight: 'bold',
|
fontWeight: 'bold',
|
||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
}}
|
}}
|
||||||
@@ -89,6 +90,7 @@ const HomeMainSongCard = (props: HomeMainSongCardProps) => {
|
|||||||
|
|
||||||
HomeMainSongCard.defaultProps = {
|
HomeMainSongCard.defaultProps = {
|
||||||
onPress: () => {},
|
onPress: () => {},
|
||||||
|
fontSize: 16,
|
||||||
};
|
};
|
||||||
|
|
||||||
export default HomeMainSongCard;
|
export default HomeMainSongCard;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import Song from '../../models/Song';
|
import Song from '../../models/Song';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Image, View } from 'react-native';
|
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';
|
import { Ionicons } from '@expo/vector-icons';
|
||||||
|
|
||||||
type SongCardInfoProps = {
|
type SongCardInfoProps = {
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ type HomeCardProps = {
|
|||||||
image: string;
|
image: string;
|
||||||
title: string;
|
title: string;
|
||||||
artist: string;
|
artist: string;
|
||||||
|
fontSize: number;
|
||||||
};
|
};
|
||||||
|
|
||||||
const cards = [
|
const cards = [
|
||||||
@@ -21,21 +22,25 @@ const cards = [
|
|||||||
image: 'https://media.discordapp.net/attachments/717080637038788731/1153688155292180560/image_homeview1.png',
|
image: 'https://media.discordapp.net/attachments/717080637038788731/1153688155292180560/image_homeview1.png',
|
||||||
title: 'Beethoven',
|
title: 'Beethoven',
|
||||||
artist: 'Synphony No. 9',
|
artist: 'Synphony No. 9',
|
||||||
|
fontSize: 46,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
image: 'https://media.discordapp.net/attachments/717080637038788731/1153688154923090093/image_homeview2.png',
|
image: 'https://media.discordapp.net/attachments/717080637038788731/1153688154923090093/image_homeview2.png',
|
||||||
title: 'Mozart',
|
title: 'Mozart',
|
||||||
artist: 'Lieder Kantate KV 619',
|
artist: 'Lieder Kantate KV 619',
|
||||||
|
fontSize: 36,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
image: 'https://media.discordapp.net/attachments/717080637038788731/1153688154499457096/image_homeview3.png',
|
image: 'https://media.discordapp.net/attachments/717080637038788731/1153688154499457096/image_homeview3.png',
|
||||||
title: 'Back',
|
title: 'Back',
|
||||||
artist: 'Truc Truc',
|
artist: 'Truc Truc',
|
||||||
|
fontSize: 26,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
image: 'https://media.discordapp.net/attachments/717080637038788731/1153688154109394985/image_homeview4.png',
|
image: 'https://media.discordapp.net/attachments/717080637038788731/1153688154109394985/image_homeview4.png',
|
||||||
title: 'Mozart',
|
title: 'Mozart',
|
||||||
artist: 'Machin Machin',
|
artist: 'Machin Machin',
|
||||||
|
fontSize: 22,
|
||||||
},
|
},
|
||||||
] as [HomeCardProps, HomeCardProps, HomeCardProps, HomeCardProps];
|
] as [HomeCardProps, HomeCardProps, HomeCardProps, HomeCardProps];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user