blob: eda3b333a72104174358e6e1ef7856e5c5e01708 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
import type { React } from "../webpack/common";
export function Flex(props: React.PropsWithChildren<{
flexDirection?: React.CSSProperties["flexDirection"];
style?: React.CSSProperties;
className?: string;
}>) {
props.style ??= {};
props.style.flexDirection ||= props.flexDirection;
props.style.gap ??= "1em";
props.style.display = "flex";
return (
<div {...props}>
{props.children}
</div>
);
}
|