Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

How can I fill text with Image or gif in react native?

$
0
0

I've tried to replicate this https://codepen.io/iamdejean/pen/wvwjjer. But I can't do like that. I've tried like the below:

import React from 'react'import { ImageBackground, StyleSheet, Text, View, Image } from 'react-native';import { TouchableOpacity } from 'react-native-gesture-handler'export const CustomGifContainer = ({onPress, text, image}) => {  return (<View style={GifContainerStyles.container}><TouchableOpacity          onPress={onPress}           style={GifContainerStyles.Gifcontainer}          activeOpacity={ 0.5}><ImageBackground source={image} style={GifContainerStyles.GifBackground}><View style={GifContainerStyles.Gifoverlay}><Text style={GifContainerStyles.text}>{text}</Text></View></ImageBackground></TouchableOpacity></View>  )}

Viewing all articles
Browse latest Browse all 6287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>