Skip to content

Commit

Permalink
Merge pull request #32341 from JKobrynski/migrateReportActionItemBasi…
Browse files Browse the repository at this point in the history
…cMessageToTypeScript

[TS Migration] Migrate ReportActionItemBasicMessage.js to TypeScript
  • Loading branch information
pecanoro authored Dec 4, 2023
2 parents ba78fbc + 545f4af commit baad59a
Showing 1 changed file with 6 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,30 +1,23 @@
import PropTypes from 'prop-types';
import React from 'react';
import {View} from 'react-native';
import Text from '@components/Text';
import useThemeStyles from '@styles/useThemeStyles';
import ChildrenProps from '@src/types/utils/ChildrenProps';

const propTypes = {
message: PropTypes.string.isRequired,
children: PropTypes.element,
type ReportActionItemBasicMessageProps = ChildrenProps & {
message: string;
};

const defaultProps = {
children: null,
};

function ReportActionItemBasicMessage(props) {
function ReportActionItemBasicMessage({message, children}: ReportActionItemBasicMessageProps) {
const styles = useThemeStyles();
return (
<View>
<Text style={[styles.chatItemMessage, styles.colorMuted]}>{props.message}</Text>
{props.children}
<Text style={[styles.chatItemMessage, styles.colorMuted]}>{message}</Text>
{children}
</View>
);
}

ReportActionItemBasicMessage.propTypes = propTypes;
ReportActionItemBasicMessage.defaultProps = defaultProps;
ReportActionItemBasicMessage.displayName = 'ReportActionBasicMessage';

export default ReportActionItemBasicMessage;

0 comments on commit baad59a

Please sign in to comment.