mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-02-09 09:13:32 +08:00
feat: add a canGoBack prop to header back button
This commit is contained in:
@@ -140,6 +140,7 @@ export type HeaderBackButtonProps = {
|
||||
onLabelLayout?: (e: LayoutChangeEvent) => void;
|
||||
screenLayout?: Layout;
|
||||
titleLayout?: Layout;
|
||||
canGoBack?: boolean;
|
||||
};
|
||||
|
||||
export type HeaderTitleProps = {
|
||||
|
||||
@@ -313,6 +313,7 @@ export default class HeaderSegment extends React.Component<Props, State> {
|
||||
screenLayout: layout,
|
||||
titleLayout,
|
||||
tintColor: headerTintColor,
|
||||
canGoBack: Boolean(onGoBack),
|
||||
})}
|
||||
</Animated.View>
|
||||
) : null}
|
||||
|
||||
Reference in New Issue
Block a user