Skip to content

Commit

Permalink
migrate UnreadActionIndicator.js to TypeScript
Browse files Browse the repository at this point in the history
  • Loading branch information
JKobrynski committed Nov 20, 2023
1 parent ff4c947 commit 4ed67b8
Showing 1 changed file with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,26 +1,30 @@
import React from 'react';
import {View} from 'react-native';
import useLocalize from '@hooks/useLocalize';
import useThemeStyles from '@styles/useThemeStyles';
import CONST from '@src/CONST';
import Text from './Text';
import withLocalize, {withLocalizePropTypes} from './withLocalize';

function UnreadActionIndicator(props) {
type UnreadActionIndicatorProps = {
reportActionID: string;
};

function UnreadActionIndicator(props: UnreadActionIndicatorProps) {
const styles = useThemeStyles();
const {translate} = useLocalize();

return (
<View
accessibilityLabel={props.translate('accessibilityHints.newMessageLineIndicator')}
accessibilityLabel={translate('accessibilityHints.newMessageLineIndicator')}
data-action-id={props.reportActionID}
style={[styles.unreadIndicatorContainer, styles.userSelectNone, styles.pointerEventsNone]}
dataSet={{[CONST.SELECTION_SCRAPER_HIDDEN_ELEMENT]: true}}
>
<View style={styles.unreadIndicatorLine} />
<Text style={styles.unreadIndicatorText}>{props.translate('common.new')}</Text>
<Text style={styles.unreadIndicatorText}>{translate('common.new')}</Text>
</View>
);
}

UnreadActionIndicator.propTypes = {...withLocalizePropTypes};

UnreadActionIndicator.displayName = 'UnreadActionIndicator';
export default withLocalize(UnreadActionIndicator);
export default UnreadActionIndicator;

0 comments on commit 4ed67b8

Please sign in to comment.