Last active
May 3, 2019 15:55
-
-
Save thepost/1d0114448bf29f1844837ed97a7e43de to your computer and use it in GitHub Desktop.
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
import React, { FC } from 'react'; | |
import { ViewProps } from 'react-native'; | |
import styled from 'styled-components/native'; | |
import { ThemeInterface } from 'themes/ThemeInterface'; | |
interface IBoxProps extends ViewProps { | |
theme?: ThemeInterface; | |
borders?: boolean; | |
} | |
const BoxRoot = styled.View<IBoxProps>` | |
padding: ${props => props.theme.lateralPadding}; | |
`; | |
const InnerBox = styled.View` | |
margin: 10px 10px; | |
background-color: white; | |
`; | |
export const Box: FC<IBoxProps> = props => ( | |
<BoxRoot {...props}> | |
<InnerBox>{props.children}</InnerBox> | |
</BoxRoot> | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment