You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Mobile/app/components/ExerciceOverview.tsx

48 lines
1.4 KiB

import React from "react";
import {Text} from "./ui/text";
import {Box} from "./ui/box";
import {ImageBackground} from "react-native";
import {HStack} from "@/app/components/ui/hstack";
import {Button} from "@/app/components/ui/button";
import {AntDesign} from "@expo/vector-icons";
export default function ExerciceOverview() {
const exercise = {
name: "Jumping Jacks",
time: "00:30",
kcal: 5,
sets: 3,
difficulty: "Medium",
imageUri: "https://random-image-pepebigotes.vercel.app/api/random-image",
};
const image = {uri: exercise.imageUri};
return (
<Box>
<ImageBackground
source={image}
imageStyle={{ borderRadius: 15 }}
>
<HStack >
<Text className="font-extrabold text-black">{exercise.time}</Text>
<Text className="text-black">{exercise.kcal} kcal</Text>
</HStack>
<HStack>
<Text className="text-black">{exercise.name}</Text>
<Text className="text-black">{exercise.sets} Sets</Text>
<Text className="text-black">{exercise.difficulty} Difficulty</Text>
<Button className="bg-transparent">
<AntDesign name="play" size={24} />
</Button>
</HStack>
</ImageBackground>
</Box>
);
}