feat: numeric habit progress with icon
This commit is contained in:
parent
89aab00e6e
commit
fdbbec3e11
@ -2,6 +2,8 @@ import { useState } from "react"
|
|||||||
import { ScrollView, StyleSheet, View } from "react-native"
|
import { ScrollView, StyleSheet, View } from "react-native"
|
||||||
import { Button, Snackbar, Text, TextInput } from "react-native-paper"
|
import { Button, Snackbar, Text, TextInput } from "react-native-paper"
|
||||||
import { SafeAreaView } from "react-native-safe-area-context"
|
import { SafeAreaView } from "react-native-safe-area-context"
|
||||||
|
import type { IconName } from "@fortawesome/free-solid-svg-icons"
|
||||||
|
import { FontAwesomeIcon } from "@fortawesome/react-native-fontawesome"
|
||||||
|
|
||||||
import type { GoalNumeric } from "@/domain/entities/Goal"
|
import type { GoalNumeric } from "@/domain/entities/Goal"
|
||||||
import { GoalNumericProgress } from "@/domain/entities/Goal"
|
import { GoalNumericProgress } from "@/domain/entities/Goal"
|
||||||
@ -66,6 +68,24 @@ export const HabitProgress: React.FC<HabitProgressProps> = ({
|
|||||||
paddingHorizontal: 20,
|
paddingHorizontal: 20,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
<View
|
||||||
|
style={{
|
||||||
|
flexDirection: "row",
|
||||||
|
justifyContent: "center",
|
||||||
|
alignItems: "center",
|
||||||
|
gap: 15,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<FontAwesomeIcon
|
||||||
|
size={24}
|
||||||
|
icon={habitHistory.habit.icon as IconName}
|
||||||
|
style={[
|
||||||
|
{
|
||||||
|
width: 30,
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
|
||||||
<Text
|
<Text
|
||||||
style={{
|
style={{
|
||||||
fontWeight: "bold",
|
fontWeight: "bold",
|
||||||
@ -75,6 +95,7 @@ export const HabitProgress: React.FC<HabitProgressProps> = ({
|
|||||||
>
|
>
|
||||||
{habitHistory.habit.name}
|
{habitHistory.habit.name}
|
||||||
</Text>
|
</Text>
|
||||||
|
</View>
|
||||||
|
|
||||||
<Text
|
<Text
|
||||||
style={{
|
style={{
|
||||||
|
Reference in New Issue
Block a user