5625d63e46
Co-authored-by: Vendicated <vendicated@riseup.net>
17 lines
493 B
TypeScript
17 lines
493 B
TypeScript
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>
|
|
);
|
|
}
|