aboutsummaryrefslogtreecommitdiff
path: root/components/Box/index.tsx
blob: 32866b2344d97d5cb741fe8a6c9a0b6731e19fda (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import { getSystemStyle, SystemProps } from '../utils/systemProps';

interface BoxProps extends SystemProps {
  style?: React.CSSProperties;
  children?: React.ReactNode;
};

const Box: React.FC<BoxProps> = ({ style, children, ...props}) => {
  const systemStyle = getSystemStyle(props, style);

  return (
    <div style={systemStyle}>
      { children }
    </div>
  );
};

export default Box;