feat(native-stack): add support for large title attributes (#135)

Co-Authored-By: Satyajit Sahoo <satyajit.happy@gmail.com>
This commit is contained in:
David
2019-10-22 00:25:50 +11:00
committed by Satyajit Sahoo
parent 0d8cdc8a27
commit 6cf1a041b2
4 changed files with 25 additions and 2 deletions

View File

@@ -123,6 +123,19 @@ export type NativeStackNavigationOptions = {
fontSize?: number;
color?: string;
};
/**
* Style object for header large title. Supported properties:
* - fontFamily
* - fontSize
*
* Only supported on iOS.
*
* @platform ios
*/
headerLargeTitleStyle?: {
fontFamily?: string;
fontSize?: number;
};
/**
* Style object for header back title. Supported properties:
* - fontFamily

View File

@@ -27,6 +27,7 @@ export default function HeaderConfig(props: Props) {
headerTranslucent,
headerStyle = {},
headerTitleStyle = {},
headerLargeTitleStyle = {},
headerBackTitleStyle = {},
headerShown,
gestureEnabled,
@@ -58,6 +59,8 @@ export default function HeaderConfig(props: Props) {
color={headerTintColor}
gestureEnabled={gestureEnabled === undefined ? true : gestureEnabled}
largeTitle={headerLargeTitle}
largeTitleFontFamily={headerLargeTitleStyle.fontFamily}
largeTitleFontSize={headerLargeTitleStyle.fontSize}
backgroundColor={headerStyle.backgroundColor}
>
{headerRight !== undefined ? (