Skip to content

Commit

Permalink
apps/relay: customize theme
Browse files Browse the repository at this point in the history
  • Loading branch information
verbiricha committed Dec 18, 2023
1 parent f29df1c commit edc5e6c
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 1 deletion.
2 changes: 2 additions & 0 deletions apps/relays/app/components/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import Container from "./container";
import Main from "./main";
import Header from "./header";
import Footer from "./footer";
import { theme } from "../theme";

const cacheAdapter = new NDKCacheAdapterDexie({ dbName: "relays" });
const ndk = new NDK({
Expand All @@ -27,6 +28,7 @@ export default function Layout({ children }: { children: ReactNode }) {

return (
<NgineProvider
theme={theme}
ndk={ndk}
links={{
component: Link,
Expand Down
31 changes: 31 additions & 0 deletions apps/relays/app/theme.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { extendTheme } from "@chakra-ui/react";
import { theme as baseTheme } from "@ngine/core";

export const theme = extendTheme(
{
semanticTokens: {
colors: {
"chakra-body-bg": { _light: "#F8F7F4", _dark: "#111111" },
"chakra-placeholder-color": {
_light: "gray.500",
_dark: "whiteAlpha.500",
},
},
},
colors: {
brand: {
50: "#ffe8df",
100: "#ffc0b1",
200: "#fe9881",
300: "#fc6f50",
400: "#fa471f",
500: "#e02d05",
600: "#af2203",
700: "#7d1701",
800: "#4e0b00",
900: "#200100",
},
},
},
baseTheme,
);
2 changes: 1 addition & 1 deletion packages/core/src/components/RecommendedAppMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ function AppMenuItem({
{isPreferredApp ? (
<HStack>
<Text>{app.display_name || app.name}</Text>
<Icon as={Star} boxSize={3} color="brand.500" />
<Icon as={Star} boxSize={3} color="chakra-subtle-text" />
</HStack>
) : (
<Text>{app.display_name || app.name}</Text>
Expand Down

1 comment on commit edc5e6c

@vercel
Copy link

@vercel vercel bot commented on edc5e6c Dec 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.