railbird-gql/src/component/session-card/session-card-stats-row-container.tsx

64 lines
1.2 KiB
TypeScript
Raw Normal View History

2024-02-20 12:19:43 -08:00
import React from "react";
import { StyleSheet, View } from "react-native";
import SessionCardStat from "./session-card-stat";
2024-02-20 12:19:43 -08:00
const SessionCardStatsRowContainer = ({
makePercent,
medianRun,
duration,
shotPacing,
}) => {
2024-02-20 12:19:43 -08:00
return (
<View style={styles.statsContainer}>
<View>
<SessionCardStat
2024-02-20 12:19:43 -08:00
displayName="Make Percent"
aggregateStat={makePercent}
numberFormat="%"
/>
</View>
<View style={styles.verticalSpacer} />
<View>
<SessionCardStat
2024-02-20 12:19:43 -08:00
displayName="Median Run"
aggregateStat={medianRun}
numberFormat=""
/>
</View>
<View style={styles.verticalSpacer} />
<View>
<SessionCardStat
2024-02-20 12:19:43 -08:00
displayName="Time Played"
aggregateStat={duration}
numberFormat=""
/>
</View>
<View style={styles.verticalSpacer} />
<View>
<SessionCardStat
2024-02-20 12:19:43 -08:00
displayName="Shot Pacing"
aggregateStat={shotPacing}
numberFormat=""
/>
</View>
</View>
);
};
const styles = StyleSheet.create({
statsContainer: {
flexDirection: "row",
justifyContent: "space-around",
margin: 16,
2024-02-20 14:38:13 -08:00
textAlign: "center",
2024-02-20 12:19:43 -08:00
},
verticalSpacer: {
width: 0.5,
backgroundColor: "#A3A3A3",
height: "75%",
marginHorizontal: 12,
},
});
export default SessionCardStatsRowContainer;