This repository has been archived by the owner on Mar 12, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add back button on credit card and billing address screens
- Loading branch information
Showing
10 changed files
with
604 additions
and
480 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import React from "react" | ||
import { NavigatorIOS, TouchableWithoutFeedback, ViewProperties } from "react-native" | ||
|
||
import { Image } from "../Elements/Image" | ||
import { theme } from "../Elements/Theme" | ||
|
||
interface ContainerWithBackButtonProps extends ViewProperties { | ||
navigator: NavigatorIOS | ||
} | ||
|
||
export class BackButton extends React.Component<ContainerWithBackButtonProps> { | ||
goBack() { | ||
this.props.navigator.pop() | ||
} | ||
|
||
render() { | ||
return ( | ||
<TouchableWithoutFeedback onPress={() => this.goBack()}> | ||
<Image | ||
position="absolute" | ||
top={theme.space[3]} | ||
left={theme.space[3]} | ||
source={require("../../../../../images/angle-left.png")} | ||
style={{ zIndex: 10 }} // Here the style prop is intentionally used to avoid making zIndex too handy. | ||
/> | ||
</TouchableWithoutFeedback> | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import React from "react" | ||
import styled from "styled-components/native" | ||
import { height, position, space, textAlign, width } from "styled-system" | ||
import { HeightProps, SpaceProps, TextAlignProps, WidthProps } from "./types" | ||
|
||
interface IconProps extends SpaceProps, WidthProps, HeightProps, SpaceProps, TextAlignProps {} | ||
|
||
const StyledImage = styled.Image.attrs<IconProps>({})` | ||
${height}; | ||
${position}; | ||
${space}; | ||
${textAlign}; | ||
${width}; | ||
` | ||
|
||
export const Image = props => <StyledImage {...props} /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.