Looking for a way to display text vertically in a dynamic manner, where the length of the text can vary. Below are some examples for reference:
<View>
<View style={{}}>
<View
style={{ marginTop: 30, flexDirection: "row", justifyContent: "center" }}
>
<Text
style={{
textAlign: "center",
fontSize: 20,
alignSelf: "center",
transform: [{ rotate: "90deg" }],
color: "white",
fontWeight: "bold",
}}
>
Short
</Text>
</View>
</View>
<View style={{}}>
<View
style={{ marginTop: 30, flexDirection: "row", justifyContent: "center" }}
>
<Text
style={{
textAlign: "center",
fontSize: 20,
alignSelf: "center",
transform: [{ rotate: "90deg" }],
color: "white",
fontWeight: "bold",
}}
>
Long Text
</Text>
</View>
</View>
</View>;