Vencord/src/components/Flex.tsx
Ven 74c3930e0a
add eslint config (#53)
* eslint

* workflow

* lint main
2022-10-06 00:42:58 +02:00

18 lines
459 B
TypeScript

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>
);
}