feat: user better syntax for defining ui components

This commit is contained in:
fragosti
2018-10-19 13:45:12 -07:00
parent 43ad2fe23b
commit d5105b5c9f
4 changed files with 4 additions and 18 deletions

View File

@@ -29,11 +29,7 @@ export interface ContainerProps {
zIndex?: number;
}
const PlainContainer: React.StatelessComponent<ContainerProps> = ({ children, className }) => (
<div className={className}>{children}</div>
);
export const Container = styled(PlainContainer)`
export const Container = styled<ContainerProps, 'div'>('div')`
box-sizing: border-box;
${props => cssRuleIfExists(props, 'display')}
${props => cssRuleIfExists(props, 'position')}