diff options
author | Vendicated <vendicated@riseup.net> | 2022-09-27 16:57:46 +0200 |
---|---|---|
committer | Vendicated <vendicated@riseup.net> | 2022-09-27 16:57:46 +0200 |
commit | 572bfcee6ce343c6bf9d69262576de4e57c01500 (patch) | |
tree | a0cdf027c41152a45183e80344d054071684a064 /src/components/Flex.tsx | |
parent | 6398dd25d20e6bc3e02425b709233066baf64e0c (diff) | |
download | Vencord-572bfcee6ce343c6bf9d69262576de4e57c01500.tar.gz Vencord-572bfcee6ce343c6bf9d69262576de4e57c01500.tar.bz2 Vencord-572bfcee6ce343c6bf9d69262576de4e57c01500.zip |
Fix Settings UI
Diffstat (limited to 'src/components/Flex.tsx')
-rw-r--r-- | src/components/Flex.tsx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/components/Flex.tsx b/src/components/Flex.tsx new file mode 100644 index 0000000..c369767 --- /dev/null +++ b/src/components/Flex.tsx @@ -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> + ); +} |