2026-08-26 14:02:44 -05:00
|
|
|
import type { ComponentProps } from "react";
|
|
|
|
|
import type { Space } from "../../types/space";
|
|
|
|
|
import { classNames } from "../../ui/classNames";
|
|
|
|
|
import styles from "./index.module.css";
|
|
|
|
|
|
|
|
|
|
interface Props extends ComponentProps<"div"> {
|
|
|
|
|
gap?: Space;
|
2026-08-27 11:23:41 -05:00
|
|
|
column?: boolean;
|
2026-08-26 14:02:44 -05:00
|
|
|
}
|
|
|
|
|
|
2026-08-27 11:23:41 -05:00
|
|
|
export function Flex({ children, column, className, gap, ...props }: Props) {
|
2026-08-26 14:02:44 -05:00
|
|
|
return (
|
|
|
|
|
<div
|
|
|
|
|
{...props}
|
|
|
|
|
className={classNames(styles.flex, className)}
|
|
|
|
|
data-gap={gap}
|
2026-08-27 11:23:41 -05:00
|
|
|
data-column={column}
|
2026-08-26 14:02:44 -05:00
|
|
|
>
|
|
|
|
|
{children}
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|