41 lines
1.2 KiB
JavaScript
41 lines
1.2 KiB
JavaScript
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
||
|
import { useTheme } from '@react-navigation/native';
|
||
|
import * as React from 'react';
|
||
|
import { Animated, Platform, StyleSheet } from 'react-native';
|
||
|
export function HeaderTitle(_ref) {
|
||
|
let {
|
||
|
tintColor,
|
||
|
style,
|
||
|
...rest
|
||
|
} = _ref;
|
||
|
const {
|
||
|
colors,
|
||
|
fonts
|
||
|
} = useTheme();
|
||
|
return /*#__PURE__*/React.createElement(Animated.Text, _extends({
|
||
|
accessibilityRole: "header",
|
||
|
"aria-level": "1",
|
||
|
numberOfLines: 1
|
||
|
}, rest, {
|
||
|
style: [{
|
||
|
color: tintColor === undefined ? colors.text : tintColor
|
||
|
}, Platform.select({
|
||
|
ios: fonts.bold,
|
||
|
default: fonts.medium
|
||
|
}), styles.title, style]
|
||
|
}));
|
||
|
}
|
||
|
const styles = StyleSheet.create({
|
||
|
title: Platform.select({
|
||
|
ios: {
|
||
|
fontSize: 17
|
||
|
},
|
||
|
android: {
|
||
|
fontSize: 20
|
||
|
},
|
||
|
default: {
|
||
|
fontSize: 18
|
||
|
}
|
||
|
})
|
||
|
});
|
||
|
//# sourceMappingURL=HeaderTitle.js.map
|