Skip to content

Commit

Permalink
fixing typecheck
Browse files Browse the repository at this point in the history
  • Loading branch information
abzokhattab committed Jan 11, 2025
1 parent d6a3bc9 commit c35a72d
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/components/EReceiptThumbnail.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React, {useMemo} from 'react';
import {View} from 'react-native';
import type {OnyxEntry} from 'react-native-onyx';
import {useOnyx} from 'react-native-onyx';
import useStyleUtils from '@hooks/useStyleUtils';
import useThemeStyles from '@hooks/useThemeStyles';
Expand All @@ -9,19 +10,23 @@ import colors from '@styles/theme/colors';
import variables from '@styles/variables';
import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
import type {Transaction} from '@src/types/onyx';
import Icon from './Icon';
import * as eReceiptBGs from './Icon/EReceiptBGs';
import * as Expensicons from './Icon/Expensicons';
import * as MCCIcons from './Icon/MCCIcons';
import Image from './Image';
import Text from './Text';

type EReceiptThumbnailOnyxProps = {
transaction: OnyxEntry<Transaction>;
};

type IconSize = 'x-small' | 'small' | 'medium' | 'large';

type EReceiptThumbnailProps = {
/** TransactionID of the transaction this EReceipt corresponds to. It's used by withOnyx HOC */
// eslint-disable-next-line react/no-unused-prop-types
transactionID: string | undefined;
transactionID?: string;

/** Border radius to be applied on the parent view. */
borderRadius?: number;
Expand Down Expand Up @@ -155,4 +160,4 @@ function EReceiptThumbnail({transactionID, borderRadius, fileExtension, isReceip

EReceiptThumbnail.displayName = 'EReceiptThumbnail';
export default EReceiptThumbnail;
export type {EReceiptThumbnailProps, IconSize};
export type {EReceiptThumbnailOnyxProps, EReceiptThumbnailProps, IconSize};

0 comments on commit c35a72d

Please sign in to comment.