aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/components/ui/container.tsx
blob: d577447b01f925871649ccb1b5853025004bd0c1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import * as React from 'react';

type StringOrNum = string | number;

export interface ContainerProps {
    marginTop?: StringOrNum;
    marginBottom?: StringOrNum;
    marginRight?: StringOrNum;
    marginLeft?: StringOrNum;
    paddingTop?: StringOrNum;
    paddingBottom?: StringOrNum;
    paddingRight?: StringOrNum;
    paddingLeft?: StringOrNum;
    maxWidth?: StringOrNum;
    children?: React.ReactNode;
}

export const Container: React.StatelessComponent<ContainerProps> = (props: ContainerProps) => {
    const { children, ...style } = props;
    return <div style={style}>{children}</div>;
};

Container.displayName = 'Container';