mirror of https://git.lenooby09.tech/LeNooby09/social-app.git
1import React from 'react' 2import {View} from 'react-native' 3 4import {MAX_ALT_TEXT} from '#/lib/constants' 5import {CharProgress} from '#/view/com/composer/char-progress/CharProgress' 6import {atoms as a, useTheme} from '#/alf' 7 8export function AltTextCounterWrapper({ 9 altText, 10 children, 11}: { 12 altText?: string 13 children: React.ReactNode 14}) { 15 const t = useTheme() 16 return ( 17 <View style={[a.flex_row]}> 18 <CharProgress 19 style={[ 20 a.flex_col_reverse, 21 a.align_center, 22 a.mr_xs, 23 {minWidth: 50, gap: 1}, 24 ]} 25 textStyle={[{marginRight: 0}, a.text_sm, t.atoms.text_contrast_medium]} 26 size={26} 27 count={altText?.length || 0} 28 max={MAX_ALT_TEXT} 29 /> 30 {children} 31 </View> 32 ) 33}