Last active
May 3, 2019 15:45
-
-
Save thepost/a1126ddd9bcd45a06da7fc07728c31a3 to your computer and use it in GitHub Desktop.
Gist 1 for styled-components tutorial
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` | |
padding: 5; | |
`; | |
export const Box: FC<IBoxProps> = props => ( | |
<BoxRoot>{props.children}</BoxRoot> | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment