import React from 'react' ; import { SvgProps } from 'react-native-svg' ; import { IconProvider } from '@ui-kitten/components' ; import { StyleSheet } from 'react-native' ; type IconElement = React . ReactElement < SvgProps > ; type IconComponent = React . ComponentType < SvgProps > ; export class EvaIcon implements IconProvider < SvgProps > { constructor ( private content ) { } public toReactElement ( props ) { const Icon = this . content ; const { style , ... svgProps } = props ; const fillColor = StyleSheet . flatten ( style || { } ) . tintColor ; return ( < Icon style = { props . style } fill = { fillColor } { ... svgProps } />); } }