Skip to content

SvgImage - remove tintColor to fix Android crash #1903

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
Show file tree
Hide file tree
Changes from 2 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
4 changes: 4 additions & 0 deletions generatedTypes/src/components/svgImage/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
/// <reference types="react" />
export interface SvgImageProps {
/**
* the asset tint
*/
tintColor?: string | null;
data: any;
}
declare function SvgImage(props: SvgImageProps): JSX.Element | null;
Expand Down
7 changes: 6 additions & 1 deletion src/components/svgImage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,16 @@ const SvgCssUri = SvgPackage?.SvgCssUri;
// const SvgProps = SvgPackage?.SvgProps; TODO: not sure how (or if) we can use their props

export interface SvgImageProps {
/**
* the asset tint
*/
tintColor?: string | null;
data: any; // TODO: I thought this should be string | React.ReactNode but it doesn't work properly
}

function SvgImage(props: SvgImageProps) {
const {data, ...others} = props;
// eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars
const {data, tintColor, ...others} = props;

if (!SvgXml) {
// eslint-disable-next-line max-len
Expand Down