diff --git a/src/pages/home/report/ReportActionItemBasicMessage.js b/src/pages/home/report/ReportActionItemBasicMessage.tsx similarity index 52% rename from src/pages/home/report/ReportActionItemBasicMessage.js rename to src/pages/home/report/ReportActionItemBasicMessage.tsx index 219564e5a8ec..bf53ee16450d 100644 --- a/src/pages/home/report/ReportActionItemBasicMessage.js +++ b/src/pages/home/report/ReportActionItemBasicMessage.tsx @@ -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 ( - {props.message} - {props.children} + {message} + {children} ); } -ReportActionItemBasicMessage.propTypes = propTypes; -ReportActionItemBasicMessage.defaultProps = defaultProps; ReportActionItemBasicMessage.displayName = 'ReportActionBasicMessage'; export default ReportActionItemBasicMessage;