Created
March 30, 2018 11:17
-
-
Save hpstuff/71d6cb7b30edb2fb26700ce5c79ceaa1 to your computer and use it in GitHub Desktop.
flow
This file contains hidden or 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
//@flow | |
import type { ComponentType } from 'react'; | |
import React from 'react'; | |
import styled from 'styled-components'; | |
type Align = 'flex-start' | 'flex-end' | 'center'; | |
type Props = { | |
align?: Align; | |
} | |
export const Container: ComponentType<Props> = styled.View` | |
flex: 1; | |
align-items: ${({align = 'center'}) => align}; | |
justify-content: center; | |
background-color: #fff; | |
`; |
This file contains hidden or 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
//@flow | |
import React, { Component } from 'react'; | |
import { Text } from 'react-native'; | |
import { Container } from '../components'; | |
export default class Landing extends Component<{}> { | |
render() { | |
return ( | |
<Container> | |
<Text testID={`landing-text`}>{`Landing`}</Text> | |
</Container> | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment