Krutika Chotara
Krutika Chotara

Reputation: 144

Show timestamp at end of <Text> in react native

enter image description here

I want to show time stamp same as this screen shot in react native. I have flex with row direction. But if the line of content is increases time stamp is not showing.

Upvotes: 0

Views: 290

Answers (1)

Imjaad
Imjaad

Reputation: 604

you can add a child text to the notification text. For example

<Text>{some_notification_text} <Text>{formatted_timestamp}</Text></Text>

this way even if the content size increases the timestamp will be always at the end. If this does not solve your problem please share your code.

Upvotes: 1

Related Questions