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

export type FlexCenterProps = FlexProps

export const FlexCenter = forwardRef<HTMLDivElement, FlexCenterProps>(
  function FlexCenter({ className, ...rest }, ref) {
    return (
      <Flex
        className={classNames("items-center", className)}
        ref={ref}
        {...rest}
      />
    )
  },
)
