mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-04-24 04:25:34 +08:00
feat(stack): use Animated.Text for header title (#105)
This commit is contained in:
committed by
Satyajit Sahoo
parent
089390ce87
commit
f39813626a
@@ -1,12 +1,13 @@
|
||||
import * as React from 'react';
|
||||
import { Text, StyleSheet, Platform, TextProps } from 'react-native';
|
||||
import { StyleSheet, Platform, TextProps } from 'react-native';
|
||||
import Animated from 'react-native-reanimated';
|
||||
|
||||
type Props = TextProps & {
|
||||
children?: string;
|
||||
};
|
||||
|
||||
export default function HeaderTitle({ style, ...rest }: Props) {
|
||||
return <Text {...rest} style={[styles.title, style]} />;
|
||||
return <Animated.Text {...rest} style={[styles.title, style]} />;
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
|
||||
Reference in New Issue
Block a user