import React, { forwardRef } from "react"
import { classNames } from "../../utils"
import { Flex, FlexProps } from "../Flex/Flex"

export type SpaceBetweenProps = FlexProps

export const SpaceBetween = forwardRef<HTMLDivElement, SpaceBetweenProps>(
  function SpaceBetween({ className, ...rest }, ref) {
    return (
      <Flex
        className={classNames("justify-between", className)}
        ref={ref}
        {...rest}
      />
    )
  },
)
