Backpack React Native text component.
npm install react-native-bpk-component-text> Backpack React Native text component.
``sh`
npm install react-native-bpk-component-text --save-dev
`js
import React, { Component } from 'react';
import { View, StyleSheet } from 'react-native';
import BpkText, { WEIGHT_STYLES } from 'react-native-bpk-component-text';
import { spacingBase } from 'bpk-tokens/tokens/base.react.native';
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
padding: spacingBase,
}
});
export default class App extends Component {
render() {
return (
);
}
}
`
| 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 |
* 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 textFontFamilytheme attribute, we expect two more fonts to be available, those are myFont_bold and myFont_black`.