import React, { FunctionComponent, HTMLAttributes, forwardRef } from "react";

export interface BoxProps extends HTMLAttributes<HTMLDivElement> {
  ref?: any;
  as?: any;
}

export const Box: FunctionComponent<BoxProps> = forwardRef<
  HTMLDivElement,
  BoxProps
>(({ as: Component = "div", ...rest }, ref) => {
  return <Component ref={ref} {...rest} />;
});
