feat: add a headerBackAccessibilityLabel option in stack

closes #9016
This commit is contained in:
Satyajit Sahoo
2020-11-03 06:22:51 +01:00
parent 52451d1109
commit c326c106f9
2 changed files with 6 additions and 0 deletions

View File

@@ -145,6 +145,10 @@ export type StackHeaderOptions = {
* Whether back button title font should scale to respect Text Size accessibility settings. Defaults to `false`.
*/
headerBackAllowFontScaling?: boolean;
/**
* Accessibility label for the header back button.
*/
headerBackAccessibilityLabel?: string;
/**
* Title string used by the back button on iOS. Defaults to the previous scene's `headerTitle`.
* Use `headerBackTitleVisible: false` to hide it.

View File

@@ -162,6 +162,7 @@ export default function HeaderSegment(props: Props) {
headerBackTitleVisible,
headerTruncatedBackTitle: truncatedLabel,
headerPressColorAndroid: pressColorAndroid,
headerBackAccessibilityLabel: backAccessibilityLabel,
headerBackAllowFontScaling: backAllowFontScaling,
headerTitleAllowFontScaling: titleAllowFontScaling,
headerTitleStyle: customTitleStyle,
@@ -290,6 +291,7 @@ export default function HeaderSegment(props: Props) {
? left({
backImage,
pressColorAndroid,
accessibilityLabel: backAccessibilityLabel,
allowFontScaling: backAllowFontScaling,
onPress: onGoBack,
labelVisible: headerBackTitleVisible,