Skip to content

changed the source type to ImageSourceType #2985

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

Merged
merged 2 commits into from
Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 1 addition & 2 deletions src/components/avatar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import _ from 'lodash';
import React, {PropsWithChildren, useMemo, forwardRef} from 'react';
import {
StyleSheet,
ImageSourcePropType,
StyleProp,
ViewStyle,
TouchableOpacity,
Expand Down Expand Up @@ -72,7 +71,7 @@ export type AvatarProps = Pick<AccessibilityProps, 'accessibilityLabel'> &
/**
* The image source (external or assets)
*/
source?: ImageSourcePropType;
source?: ImageProps['source'];
/**
* Image props object
*/
Expand Down
8 changes: 4 additions & 4 deletions src/components/icon/index.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import isUndefined from 'lodash/isUndefined';
import React, {useMemo, forwardRef} from 'react';
import {Image, ImageProps, StyleSheet, StyleProp, ViewStyle} from 'react-native';
import {Image, ImageProps as RNImageProps, StyleSheet, StyleProp, ViewStyle} from 'react-native';
import {asBaseComponent, BaseComponentInjectedProps, MarginModifiers, Constants} from '../../commons/new';
import {ComponentStatics} from '../../typings/common';
import {getAsset, isSvg, isBase64ImageContent} from '../../utils/imageUtils';
import {RecorderProps} from '../../typings/recorderTypes';
import Badge, {BadgeProps} from '../badge';
import SvgImage from '../svgImage';
import type {ImageSourceType} from '../image';
import type {ImageProps} from '../image';

export type IconProps = Omit<ImageProps, 'source'> &
export type IconProps = Omit<RNImageProps, 'source'> &
MarginModifiers &
RecorderProps & {
/**
Expand All @@ -36,7 +36,7 @@ export type IconProps = Omit<ImageProps, 'source'> &
* whether the icon should flip horizontally on RTL
*/
supportRTL?: boolean;
source?: ImageSourceType
source?: ImageProps['source'];
};

/**
Expand Down