A
A
ajlee42020-11-29 00:00:14
React Native
ajlee4, 2020-11-29 00:00:14

How to correctly display links inside text?

I need to do it like this XTjUMTq.png.
While I did so

<View style={styles.agreementTitle}>
                    <ElTitle>{translate('ohers.agree')}</ElTitle>
                    <ElLink onPress={() => props.navigation.navigate('agreement', {
                        uri: 'privacy'
                    })}>{translate('elements.labels.policy')}</ElLink>
                    <ElTitle>{translate('ohers.and')}</ElTitle>
                    <ElLink onPress={() => props.navigation.navigate('agreement', {
                        uri: 'terms'
                    })}>{translate('elements.labels.terms')}</ElLink>
                </View>

but since there are 4 components, it is normally not possible to make it up. Are there any other implementations of such a thing?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
davidnum95, 2020-12-03
@davidnum95

<Text>
 I agree with
 <TouchableOpacity onPress={() => {}}>
  <Text>Privacy</Text>
 <TouchableOpacity />
</Text>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question