react-native-bpk-component-text
Backpack React Native text component.
Installation
npm install react-native-bpk-component-text --save-dev
Usage
;;;; const styles = StyleSheet; { return <View style=stylescontainer> <BpkText textStyle='xxl'>Backpack rocks!</BpkText> <BpkText textStyle='xl' weight=WEIGHT_STYLESheavy>Backpack rocks!</BpkText> <BpkText textStyle='lg' weight=WEIGHT_STYLESemphasized>Backpack rocks!</BpkText> <BpkText textStyle='base'>Backpack rocks!</BpkText> <BpkText textStyle='sm'>Backpack rocks!</BpkText> <BpkText textStyle='xs'>Backpack rocks!</BpkText> <BpkText textStyle='caps'>BACKPACK ROCKS!</BpkText> </View> ; }
Props
Property | PropType | Required | Default Value |
---|---|---|---|
children | node | true | - |
textStyle | oneOf('xxl', 'xl', 'lg', 'base', 'sm', 'xs', 'caps') | false | base |
weight | oneOf('regular', 'emphasized', 'heavy') | false | regular |
emphasize (deprecated, use weight ) |
bool | false | false |
Theme props
textFontFamily
NOTE: For Android we expect font names to follow a specific name convention for bold and heavy variations. E.g. if you provide a font called myFont
to the textFontFamily
theme attribute, we expect two more fonts to be available, those are myFont_bold
and myFont_black
.