Skip to content

Instantly share code, notes, and snippets.

@infomiho
Created March 8, 2024 19:35
Show Gist options
  • Save infomiho/a18421740c205d1794c36c274bf09fc8 to your computer and use it in GitHub Desktop.
Save infomiho/a18421740c205d1794c36c274bf09fc8 to your computer and use it in GitHub Desktop.
Wasp with Radix UI
app radixui {
wasp: {
version: "^0.12.3"
},
title: "radixui",
client: {
rootComponent: import { Layout } from "@src/Layout",
}
}
route RootRoute { path: "/", to: MainPage }
page MainPage {
component: import { MainPage } from "@src/MainPage"
}
{
"name": "radixui",
"dependencies": {
"@radix-ui/themes": "^2.0.3",
"react": "^18.2.0",
"wasp": "file:.wasp/out/sdk/wasp"
},
"devDependencies": {
"@types/react": "^18.0.37",
"prisma": "4.16.2",
"typescript": "^5.1.0",
"vite": "^4.3.9"
}
}
import "@radix-ui/themes/styles.css";
import { Theme } from "@radix-ui/themes";
export function Layout({ children }) {
return <Theme>{children}</Theme>;
}
import { Flex, Text, Button } from "@radix-ui/themes";
export const MainPage = () => {
return (
<Flex direction="column" gap="2">
<Text>Hello from Radix Themes :)</Text>
<Button>Let's go</Button>
</Flex>
);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment