({maxCommentLength = CONST.MAX_COMMENT_LENGTH, isTaskTitle = false}: ExceededCommentLengthProps)
| 10 | }; |
| 11 | |
| 12 | function ExceededCommentLength({maxCommentLength = CONST.MAX_COMMENT_LENGTH, isTaskTitle = false}: ExceededCommentLengthProps) { |
| 13 | const styles = useThemeStyles(); |
| 14 | const {numberFormat, translate} = useLocalize(); |
| 15 | |
| 16 | const translationKey = isTaskTitle ? 'composer.taskTitleExceededMaxLength' : 'composer.commentExceededMaxLength'; |
| 17 | |
| 18 | return ( |
| 19 | <Text |
| 20 | style={[styles.textMicro, styles.textDanger, styles.chatItemComposeSecondaryRow, styles.mlAuto, styles.pl2]} |
| 21 | numberOfLines={1} |
| 22 | > |
| 23 | {translate(translationKey, numberFormat(maxCommentLength))} |
| 24 | </Text> |
| 25 | ); |
| 26 | } |
| 27 | |
| 28 | export default ExceededCommentLength; |
nothing calls this directly
no test coverage detected