Skip to content

Commit

Permalink
fix: nb changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Suraj authored and Suraj committed Dec 8, 2023
1 parent cd45273 commit 7f880ba
Show file tree
Hide file tree
Showing 6 changed files with 154 additions and 158 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@babel/traverse": "^7.16.3",
"@docsearch/react": "^3.0.0-alpha.42",
"@expo/vector-icons": "^12.0.5",
"@gluestack-ui/themed-native-base": "^0.1.39",
"@gluestack-ui/themed-native-base": "^0.1.47",
"@gluestack/ui-next-adapter": "^2.1.10",
"@mdx-js/loader": "^1.6.22",
"@next/mdx": "^12.0.4",
Expand Down
15 changes: 9 additions & 6 deletions pages/_document.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { Children } from 'react';
import Document, { Html, Head, Main, NextScript } from 'next/document';
import { AppRegistry } from 'react-native';
import config from '../app.json';
import { Children } from "react";
import Document, { Html, Head, Main, NextScript } from "next/document";
import { AppRegistry } from "react-native";
import config from "../app.json";

import { flush } from "@gluestack-ui/themed-native-base";
// Force Next-generated DOM elements to fill their parent's height
const normalizeNextElements = `
#__next {
Expand All @@ -20,20 +22,21 @@ export default class MyDocument extends Document {
// eslint-disable-next-line react/jsx-key
<style dangerouslySetInnerHTML={{ __html: normalizeNextElements }} />,
getStyleElement(),
flush(),
];
return { ...page, styles: Children.toArray(styles) };
}

render() {
return (
<Html style={{ height: '100%' }}>
<Html style={{ height: "100%" }}>
<Head>
<meta
name="google-site-verification"
content="CrITr8VxlSHTwFPrOKF1iC4Rp00Cm9ndrBAvxBQd6-M"
/>
</Head>
<body style={{ height: '100%', overflow: 'hidden' }}>
<body style={{ height: "100%", overflow: "hidden" }}>
<Main />
<NextScript />
</body>
Expand Down
1 change: 1 addition & 0 deletions src/components/NBHistory/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export default function NBHistory() {
rounded="1"
/>
<Stack
// direction={"row"}
direction={{ base: "column", md: "row" }}
justifyContent={"space-around"}
>
Expand Down
6 changes: 2 additions & 4 deletions src/new-components/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ const SidebarItem = (props: any) => {

return sidebarItems.map((item: any, index: any) => {
if (item?.notVisibleInSidebar === true) return null;

return (
<Box key={index} w="100%">
{item.pages === undefined ? (
Expand Down Expand Up @@ -113,10 +112,9 @@ const SidebarItem = (props: any) => {
collapsed={item.isCollapsed || false}
setIsOpenSidebar={setIsOpenSidebar}
>
{console.log(item.pages, ">>>>>>")}
<SidebarItem
sidebarItems={[]}
level={level + 1}
sidebarItems={item.pages}
level={level ?? 0 + 1}
setIsOpenSidebar={setIsOpenSidebar}
isMobile={isMobile}
/>
Expand Down
98 changes: 51 additions & 47 deletions src/theme/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,82 +4,86 @@ import colors from "./colors";
export const getNativeBaseTheme = (colorMode) => {
return extendTheme({
colors: {
backgroundLight: colors.coolGray[100],
backgroundDark: colors.blueGray[900],
"backgroundLight": colors.coolGray[100],
"backgroundDark": colors.blueGray[900],

primaryTextDark: colors.cyan[200],
primaryTextLight: colors.cyan[700],
"primaryTextDark": colors.cyan[200],
"primaryTextLight": colors.cyan[700],

borderColorDark: colors.coolGray[800],
borderColorLight: "#dfe3e6",
"borderColorDark": colors.coolGray[800],
"borderColorLight": "#dfe3e6",

// -------------------------------------------------- TOC -------------------------------------------

tocActiveTextLightColor: colors.coolGray[900],
tocActiveTextDarkColor: colors.coolGray[50],
"tocActiveTextLightColor": colors.coolGray[900],
"tocActiveTextDarkColor": colors.coolGray[50],

tocTextLightColor: colors.coolGray[400],
tocTextDarkColor: colors.coolGray[500],
"tocTextLightColor": colors.coolGray[400],
"tocTextDarkColor": colors.coolGray[500],

tocLeftDarkBorder: colors.coolGray[700],
tocLeftLightBorder: colors.coolGray[300],
"tocLeftDarkBorder": colors.coolGray[700],
"tocLeftLightBorder": colors.coolGray[300],

tocLeftDarkBorderBall: colors.coolGray[800],
tocLeftLightBorderBall: colors.coolGray[300],
"tocLeftDarkBorderBall": colors.coolGray[800],
"tocLeftLightBorderBall": colors.coolGray[300],

tocLeftDarkBorderActiveBall: colors.coolGray[400],
tocLeftLightBorderActiveBall: colors.coolGray[600],
"tocLeftDarkBorderActiveBall": colors.coolGray[400],
"tocLeftLightBorderActiveBall": colors.coolGray[600],

// -------------------------------------------------- SideBar -------------------------------------------

sidebarBackgroundLight: colors.coolGray[100],
sidebarBackgroundDark: colors.blueGray[900],
sidebarItemHeadingTextDark: colors.coolGray[50],
sidebarItemHeadingTextLight: colors.blueGray[900],
sidebarItemTextDark: colors.coolGray[200],
sidebarItemTextLight: "#11181c",
"sidebarBackgroundLight": colors.coolGray[100],
"sidebarBackgroundDark": colors.blueGray[900],
"sidebarItemHeadingTextDark": colors.coolGray[50],
"sidebarItemHeadingTextLight": colors.blueGray[900],
"sidebarItemTextDark": colors.coolGray[200],
"sidebarItemTextLight": "#11181c",

activeSidebarItemBackgroundLight: colors.cyan[200],
activeSidebarItemBackgroundDark: colors.cyan[700],
activeSidebarItemHoverBackgroundLight: colors.cyan[200],
activeSidebarItemHoverBackgroundDark: colors.cyan[600],
"activeSidebarItemBackgroundLight": colors.cyan[200],
"activeSidebarItemBackgroundLight:alpha.60": colors.cyan[200],

inactiveSidebarItemHoverBackgroundLight: colors.blueGray[200],
inactiveSidebarItemHoverBackgroundDark: colors.blueGray[800],
"activeSidebarItemBackgroundDark": colors.cyan[700],
"activeSidebarItemHoverBackgroundLight": colors.cyan[200],
"activeSidebarItemHoverBackgroundLight:alpha.80": colors.cyan[200],
"activeSidebarItemHoverBackgroundDark": colors.cyan[600],
"activeSidebarItemHoverBackgroundDark:alpha.80": colors.cyan[700],

"inactiveSidebarItemHoverBackgroundLight": colors.blueGray[200],
"inactiveSidebarItemHoverBackgroundDark": colors.blueGray[800],

// -------------------------------------------------- Link -------------------------------------------

inactiveLinkTextColorLight: "#687076",
inactiveLinkTextColorDark: "#9ba1a6",
inactiveHoverBorderBottomLinkColorDark: "#26292b",
inactiveHoverBorderBottomLinkColorLight: "#eceef0",
"inactiveLinkTextColorLight": "#687076",
"inactiveLinkTextColorDark": "#9ba1a6",
"inactiveHoverBorderBottomLinkColorDark": "#26292b",
"inactiveHoverBorderBottomLinkColorLight": "#eceef0",

activeLinkTextColorLight: "#11181c",
activeLinkTextColorDark: "#ecedee",
activeBorderBottomLinkColorLight: "#eceef0",
activeBorderBottomLinkColorDark: "#eceef0",
activeHoverBorderBottomLinkColorDark: "#26292b",
activeHoverBorderBottomLinkColorLight: "#eceef0",
"activeLinkTextColorLight": "#11181c",
"activeLinkTextColorDark": "#ecedee",
"activeBorderBottomLinkColorLight": "#eceef0",
"activeBorderBottomLinkColorDark": "#eceef0",
"activeHoverBorderBottomLinkColorDark": "#26292b",
"activeHoverBorderBottomLinkColorLight": "#eceef0",

// -------------------------------------------------- Page Navs -------------------------------------------

pageNavigationHeadingLight: "#687076",
pageNavigationHeadingDark: "#9ba1a6",
pageNavigationMainTitleLight: "#006adc",
pageNavigationMainTitleDark: "#52a9ff",
"pageNavigationHeadingLight": "#687076",
"pageNavigationHeadingDark": "#9ba1a6",
"pageNavigationMainTitleLight": "#006adc",
"pageNavigationMainTitleDark": "#52a9ff",

// -------------------------------------------------- Tabs -------------------------------------------

SelectedTabTextColor: "#52a9ff",
SelectedTabBorderColor: "#52a9ff",
"SelectedTabTextColor": "#52a9ff",
"SelectedTabBorderColor": "#52a9ff",

// -------------------------------------------------- CodeBlock -------------------------------------------

codeBlockBackgroundColor: "#171E2E",
"codeBlockBackgroundColor": "#171E2E",

// -------------------------------------------------- Admonitions -------------------------------------------
tipBackgroundColorDark: colors.coolGray[300],
tipBackgroundColorLight: colors.coolGray[900],
"tipBackgroundColorDark": colors.coolGray[300],
"tipBackgroundColorLight": colors.coolGray[900],
},
config: {
initialColorMode: colorMode,
Expand Down
Loading

0 comments on commit 7f880ba

Please sign in to comment.