adjustments to track favorite icons

This commit is contained in:
Violet Caulfield
2025-01-16 10:20:42 -06:00
parent c65fd69026
commit 8602ea7687
2 changed files with 6 additions and 4 deletions

View File

@@ -110,12 +110,12 @@ export default function Track({
<XStack
alignItems="center"
justifyContent="center"
justifyContent="flex-end"
alignContent="center"
flex={1}
>
{ track.UserData?.IsFavorite && (
<Icon name="heart" color={Colors.Primary} />
<Icon small name="heart" color={Colors.Primary} />
)}
<RunTimeTicks>{ track.RunTimeTicks }</RunTimeTicks>
</XStack>

View File

@@ -3,14 +3,16 @@ import MaterialCommunityIcons from "react-native-vector-icons/MaterialCommunityI
import { Colors } from "../../../enums/colors"
import { useColorScheme } from "react-native";
const smallSize = 24;
const regularSize = 36;
const largeSize = 48
export default function Icon({ name, onPress, large, color }: { name: string, onPress?: Function, large?: boolean, color?: Colors }) : React.JSX.Element {
export default function Icon({ name, onPress, small, large, color }: { name: string, onPress?: Function, small?: boolean, large?: boolean, color?: Colors }) : React.JSX.Element {
const isDarkMode = useColorScheme() === "dark"
let size = large ? largeSize : regularSize
let size = large ? largeSize : small ? smallSize : regularSize
return (
<MaterialCommunityIcons