import React, { ReactNode } from "react";
import StyledStack from "./StyledStack";

export type StackProps = {
  children?: ReactNode;
  direction?: "row" | "column";
  columnSpacing?: number;
  rowSpacing?: number;
  wrap?: boolean;
  props?: any;
};

const Stack: React.FC<StackProps> = ({
  children,
  direction = "row",
  columnSpacing = 1,
  rowSpacing = 1,
  wrap = false,
  ...props
}) => {
  return (
    <StyledStack
      direction={direction}
      rowSpacing={rowSpacing}
      columnSpacing={columnSpacing}
      wrap={wrap}
      {...props}
    >
      {children}
    </StyledStack>
  );
};

export default Stack;
