import React from 'react'; import { View, StyleSheet, ViewStyle, TextStyle } from 'react-native'; import { useStyles } from '../../hooks'; import { ComponentStyleProp, LLComponentStyleFn } from '../../types'; import { LLText } from '../LLText'; export type LLCheerMeterWidgetCheerCountStyles = { cheerCountContainer: ViewStyle; cheerCountText: TextStyle; }; export type LLCheerMeterWidgetCheerCountProps = ComponentStyleProp & { totalCheerCount: number; }; export function LLCheerMeterWidgetCheerCount({ totalCheerCount, styles: stylesProp, }: LLCheerMeterWidgetCheerCountProps) { const styles = useStyles({ componentStylesFn: getCheerMeterWidgetTotalCountStyles, stylesProp, }); return ( {totalCheerCount} ); } const getCheerMeterWidgetTotalCountStyles: LLComponentStyleFn< LLCheerMeterWidgetCheerCountStyles > = ({ theme }) => StyleSheet.create({ cheerCountContainer: { position: 'absolute', left: '45%', height: '100%', justifyContent: 'center', alignItems: 'center', }, cheerCountText: { fontSize: 18, color: theme.text, }, });