blob: 8a80f02aeecb0f51a3cc6f4fdee636f8ba9aa021 (
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;
} & React.HTMLProps<HTMLDivElement>>) {
props.style ??= {};
props.style.flexDirection ||= props.flexDirection;
props.style.gap ??= "1em";
props.style.display = "flex";
return (
<div {...props}>
{props.children}
</div>
);
}
|