Fix Settings UI
This commit is contained in:
17
src/components/Flex.tsx
Normal file
17
src/components/Flex.tsx
Normal file
@ -0,0 +1,17 @@
|
||||
import { PropsWithChildren } from "react";
|
||||
import type { React } from '../webpack/common';
|
||||
|
||||
export function Flex(props: React.PropsWithChildren<{
|
||||
flexDirection?: React.CSSProperties["flexDirection"];
|
||||
style?: React.CSSProperties;
|
||||
}>) {
|
||||
props.style ??= {};
|
||||
props.style.flexDirection ||= props.flexDirection;
|
||||
props.style.gap ??= "1em";
|
||||
props.style.display = "flex";
|
||||
return (
|
||||
<div {...props}>
|
||||
{props.children}
|
||||
</div>
|
||||
);
|
||||
}
|
Reference in New Issue
Block a user