Skip to content

Instantly share code, notes, and snippets.

@thepost
Last active May 3, 2019 15:45
Show Gist options
  • Save thepost/a1126ddd9bcd45a06da7fc07728c31a3 to your computer and use it in GitHub Desktop.
Save thepost/a1126ddd9bcd45a06da7fc07728c31a3 to your computer and use it in GitHub Desktop.
Gist 1 for styled-components tutorial
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