import { Slot } from "@radix-ui/react-slot"; import * as React from "react"; import type { DistributiveOmit } from "../../utils/styled"; import { Flex, type FlexProps } from "../Flex"; export type ResponsivePairProps = DistributiveOmit & { /** * @default "wrap-reverse" */ wrap?: "wrap" | "wrap-reverse"; children: [React.ReactNode, React.ReactNode]; }; export const ResponsivePair = React.forwardRef( (props, ref) => { const { wrap = "wrap-reverse", gap, children, ...rest } = props; const childrenArray = React.Children.toArray(children); const style = { "--seed-box-min-width": `calc(${100 / childrenArray.length}% - var(--responsive-pair-gap) / ${childrenArray.length})`, "--seed-box-flex-grow": 1, } as React.CSSProperties; return ( {childrenArray[0]} {childrenArray[1]} ); }, );