2022-10-06 00:42:58 +02:00
|
|
|
import type { React } from "../webpack/common";
|
2022-09-27 16:57:46 +02:00
|
|
|
|
|
|
|
export function Flex(props: React.PropsWithChildren<{
|
|
|
|
flexDirection?: React.CSSProperties["flexDirection"];
|
|
|
|
style?: React.CSSProperties;
|
2022-10-01 00:42:50 +02:00
|
|
|
className?: string;
|
2022-09-27 16:57:46 +02:00
|
|
|
}>) {
|
|
|
|
props.style ??= {};
|
|
|
|
props.style.flexDirection ||= props.flexDirection;
|
|
|
|
props.style.gap ??= "1em";
|
|
|
|
props.style.display = "flex";
|
|
|
|
return (
|
|
|
|
<div {...props}>
|
|
|
|
{props.children}
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|