UNPKG

@react-native-ohos/react-native-material-buttons

Version:

Material buttons

31 lines (22 loc) 587 B
import { StyleSheet, Platform } from 'react-native'; import RN from 'react-native/package.json'; let style = {}; let [, major, minor] = RN.version .match(/^(\d+)\.(\d+)\.(.+)$/); if ('android' === Platform.OS) { style.textAlignVertical = 'center'; if (!major && minor >= 40) { style.includeFontPadding = false; } } const styles = StyleSheet.create({ title: { textAlign: 'center', textTransform: 'uppercase', backgroundColor: 'transparent', fontSize: 14, fontWeight: '500', ...style, }, }); export { styles };