Skip to content

Instantly share code, notes, and snippets.

@euxn23
Created December 26, 2023 17:57
Show Gist options
  • Save euxn23/52b8a8c89ef9f0501e639b9cbedbdbcd to your computer and use it in GitHub Desktop.
Save euxn23/52b8a8c89ef9f0501e639b9cbedbdbcd to your computer and use it in GitHub Desktop.
Radix UI utilities
import { ReactNode } from "react";
import { Flex } from "@radix-ui/themes";
export function Center({ children }: { children: ReactNode }) {
return (
<Flex justify="center" direction="column" align="center" height="100%" width="100%" gap="4">
{children}
</Flex>
);
}
@import "@radix-ui/themes/styles.css";
:root {
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
line-height: 1.5;
font-weight: 400;
font-synthesis: none;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
html {
height: 100%;
}
body {
height: 100%;
margin: 0;
}
a {
color: inherit;
text-decoration: none;
}
#root {
height: 100%;
display: flex;
flex-direction: column;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment