Add ellipsis to the checklist title (#9059)

This commit is contained in:
Daniel Espino García 2025-08-08 13:41:05 +02:00 committed by GitHub
parent 464b15ffb0
commit a102b6147e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -61,6 +61,9 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => ({
skippedText: {
textDecorationLine: 'line-through',
},
titleContainer: {
flexShrink: 1,
},
}));
type Props = {
@ -134,7 +137,14 @@ const Checklist = ({
name={expanded ? 'chevron-down' : 'chevron-right'}
style={styles.chevron}
/>
<Text style={titleTextStyle}>{checklist.title}</Text>
<View style={styles.titleContainer}>
<Text
style={titleTextStyle}
numberOfLines={1}
>
{checklist.title}
</Text>
</View>
<Text style={styles.progressText}>{`${completed} / ${totalNumber} done`}</Text>
</View>
<ProgressBar