Siddhant Shelake
Siddhant Shelake

Reputation: 61

React native and SVG image

import {StyleSheet, Text, View} from 'react-native';
import React from 'react';

import Phone from '../assets/images/icons/phone.svg';
const Background = () => {
  return (
    <View>
      <Text>Background</Text>
      <View>
        <Phone height={400} width={300} />
      </View>
    </View>
  );
};

error : Type '{ height: number; width: number; }' is not assignable to type 'IntrinsicAttributes'. Property 'height' does not exist on type 'IntrinsicAttributes'.

text

I follwed all installation steps but when i try to give height and width to svg it showing typescript error.

Upvotes: 1

Views: 154

Answers (0)

Related Questions