Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TS migration] Migrate 'ReportActionItemGrouped.js' component to TypeScript #32192

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
import PropTypes from 'prop-types';
import React from 'react';
import {View} from 'react-native';
import stylePropTypes from '@styles/stylePropTypes';
import React, {ReactNode} from 'react';
import {View, ViewStyle} from 'react-native';
import useThemeStyles from '@styles/useThemeStyles';

const propTypes = {
type ReportActionItemGroupedProps = {
/** Children view component for this action item */
children: PropTypes.node.isRequired,
children: ReactNode;

pac-guerreiro marked this conversation as resolved.
Show resolved Hide resolved
/** Styles for the outermost View */
wrapperStyle: stylePropTypes,
wrapperStyle?: ViewStyle;
};
pac-guerreiro marked this conversation as resolved.
Show resolved Hide resolved

const defaultProps = {
wrapperStyle: undefined,
};

function ReportActionItemGrouped({wrapperStyle, children}) {
function ReportActionItemGrouped({wrapperStyle, children}: ReportActionItemGroupedProps) {
const styles = useThemeStyles();
return (
<View style={[styles.chatItem, wrapperStyle]}>
Expand All @@ -25,7 +19,6 @@ function ReportActionItemGrouped({wrapperStyle, children}) {
);
}

ReportActionItemGrouped.propTypes = propTypes;
ReportActionItemGrouped.defaultProps = defaultProps;
ReportActionItemGrouped.displayName = 'ReportActionItemGrouped';

export default ReportActionItemGrouped;
Loading