-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #32341 from JKobrynski/migrateReportActionItemBasi…
…cMessageToTypeScript [TS Migration] Migrate ReportActionItemBasicMessage.js to TypeScript
- Loading branch information
Showing
1 changed file
with
6 additions
and
13 deletions.
There are no files selected for viewing
19 changes: 6 additions & 13 deletions
19
...me/report/ReportActionItemBasicMessage.js → ...e/report/ReportActionItemBasicMessage.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |