首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

TextStylePropTypes

道具

color?: color

fontFamily?: string

fontSize?: number

fontStyle?: enum('normal', 'italic')

fontWeight?: enum('normal', 'bold', '100', '200', '300', '400', '500', '600', '700', '800', '900')

指定字体重量。大多数字体支持“正常”和“粗体”值。并非所有的字体都有各个数值的变体,在这种情况下,选择最接近的一个。

lineHeight?: number

textAlign?: enum('auto', 'left', 'right', 'center', 'justify')

指定文本对齐。值'justify'只支持iOS和left在Android 上回退。

textDecorationLine?: enum('none', 'underline', 'line-through', 'underline line-through')

textShadowColor?: color

textShadowOffset?: {width: number, height: number}

textShadowRadius?: number

androidincludeFontPadding?: bool

设置为false删除额外的字体填充,旨在为某些上行/下行空间腾出空间。使用一些字体时,这种填充可以使文本看起来在垂直居中时略微不对齐。为了最好的结果也设置textAlignVerticalcenter。默认值是true。

androidtextAlignVertical?: enum('auto', 'top', 'bottom', 'center')

iosfontVariant?: [enum('small-caps', 'oldstyle-nums', 'lining-nums', 'tabular-nums', 'proportional-nums')]

iosletterSpacing?: number

iostextDecorationColor?: color

iostextDecorationStyle?: enum('solid', 'double', 'dotted', 'dashed')

ioswritingDirection?: enum('auto', 'ltr', 'rtl')

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com