A Better SuperScript in React Native

const superFontSize = Math.floor(fontSize * 0.6)
const superlineHeight = superFontSize * 1.1
const superStyle = {
textAlignVertical: 'top',
fontSize: superFontSize,
lineHeight: superlineHeight
}
const regular = {
textAlignVertical: 'bottom',
fontSize: fontSize
}
<View style={{flexDirection: 'row', alignItems: 'flex-start'}}> <Text style={superStyle}>Super</Text> <Text style={regular}> Regular Text</Text></View>

WHY

const superFontSize = Math.floor(fontSize * 0.6)
const superlineHeight = superFontSize * 1.1
<View style={{flexDirection: 'row', alignItems: 'flex-start'}}>

What about other Solutions

Getting Free

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store