Skip to content

chore: Mantine update #479

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Jan 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/editor/examples/basic/App.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { uploadToTmpFilesDotOrg_DEV_ONLY } from "@blocknote/core";
import "@blocknote/core/style.css";
import { BlockNoteView, useBlockNote } from "@blocknote/react";
import "@blocknote/react/style.css";

type WindowWithProseMirror = Window & typeof globalThis & { ProseMirror: any };

Expand Down
2 changes: 1 addition & 1 deletion examples/editor/examples/collaboration/App.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { uploadToTmpFilesDotOrg_DEV_ONLY } from "@blocknote/core";
import "@blocknote/core/style.css";
import { BlockNoteView, useBlockNote } from "@blocknote/react";
import "@blocknote/react/style.css";

import YPartyKitProvider from "y-partykit/provider";
import * as Y from "yjs";
Expand Down
2 changes: 1 addition & 1 deletion examples/editor/examples/react-custom-blocks/App.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { defaultBlockSpecs, defaultProps } from "@blocknote/core";
import "@blocknote/core/style.css";
import {
BlockNoteView,
createReactBlockSpec,
useBlockNote,
} from "@blocknote/react";
import "@blocknote/react/style.css";
import "../vanilla-custom-blocks/style.css";

type WindowWithProseMirror = Window & typeof globalThis & { ProseMirror: any };
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { defaultInlineContentSpecs } from "@blocknote/core";
import "@blocknote/core/style.css";
import {
BlockNoteView,
createReactInlineContentSpec,
useBlockNote,
} from "@blocknote/react";
import "@blocknote/react/style.css";

type WindowWithProseMirror = Window & typeof globalThis & { ProseMirror: any };

Expand Down
2 changes: 1 addition & 1 deletion examples/editor/examples/react-custom-styles/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
DefaultInlineContentSchema,
defaultStyleSpecs,
} from "@blocknote/core";
import "@blocknote/core/style.css";
import {
BlockNoteView,
createReactStyleSpec,
Expand All @@ -14,6 +13,7 @@ import {
useActiveStyles,
useBlockNote,
} from "@blocknote/react";
import "@blocknote/react/style.css";

type WindowWithProseMirror = Window & typeof globalThis & { ProseMirror: any };

Expand Down
2 changes: 1 addition & 1 deletion examples/editor/examples/vanilla-custom-blocks/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import {
defaultBlockSpecs,
defaultProps,
} from "@blocknote/core";
import "@blocknote/core/style.css";
import { BlockNoteView, useBlockNote } from "@blocknote/react";
import "@blocknote/react/style.css";
import "./style.css";

type WindowWithProseMirror = Window & typeof globalThis & { ProseMirror: any };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import {
createInlineContentSpec,
defaultInlineContentSpecs,
} from "@blocknote/core";
import "@blocknote/core/style.css";
import { BlockNoteView, useBlockNote } from "@blocknote/react";
import "@blocknote/react/style.css";

type WindowWithProseMirror = Window & typeof globalThis & { ProseMirror: any };

Expand Down
2 changes: 1 addition & 1 deletion examples/editor/examples/vanilla-custom-styles/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {
DefaultInlineContentSchema,
defaultStyleSpecs,
} from "@blocknote/core";
import "@blocknote/core/style.css";
import {
BlockNoteView,
FormattingToolbarPositioner,
Expand All @@ -14,6 +13,7 @@ import {
useActiveStyles,
useBlockNote,
} from "@blocknote/react";
import "@blocknote/react/style.css";

type WindowWithProseMirror = Window & typeof globalThis & { ProseMirror: any };

Expand Down
2 changes: 1 addition & 1 deletion examples/editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"dependencies": {
"@blocknote/core": "^0.10.1",
"@blocknote/react": "^0.10.1",
"@mantine/core": "^5.6.1",
"@mantine/core": "^7.3.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.20.0",
Expand Down
13 changes: 0 additions & 13 deletions examples/editor/src/App.css

This file was deleted.

52 changes: 24 additions & 28 deletions examples/editor/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AppShell, Navbar, ScrollArea } from "@mantine/core";
import { AppShell, MantineProvider, ScrollArea } from "@mantine/core";
import React from "react";
import { createRoot } from "react-dom/client";
import {
Expand Down Expand Up @@ -66,15 +66,23 @@ function Root() {
// // "root:hover": { background: "blue" },
// });
return (
<AppShell
padding={0}
navbar={
window.location.search.includes("hideMenu") ? undefined : (
<Navbar
width={{ base: 300 }}
style={{ background: "#f7f7f5" }}
p="xs">
<Navbar.Section grow component={ScrollArea} mx="-xs" px="xs">
<MantineProvider>
<AppShell
padding={0}
// header={<Header height={60} p="xs">
// {/* Header content */}
// </Header>}
styles={() => ({
main: {
backgroundColor: "white",
// theme.colorScheme === "dark"
// ? theme.colors.dark[8]
// : theme.colors.gray[0],
},
})}>
{window.location.search.includes("hideMenu") ? undefined : (
<AppShell.Navbar w={{ base: 300 }} p="xs">
<AppShell.Section grow component={ScrollArea} mx="-xs" px="xs">
{editors.map((editor, i) => (
<div key={i}>
<Link to={editor.path}>{editor.title}</Link>
Expand All @@ -95,24 +103,12 @@ function Root() {
// icon={<IconGauge size={16} stroke={1.5} />}
// rightSection={<IconChevronRight size={12} stroke={1.5} />}
/> */}
</Navbar.Section>
</Navbar>
)
}
header={<></>}
// header={<Header height={60} p="xs">
// {/* Header content */}
// </Header>}
styles={(theme) => ({
main: {
backgroundColor: "white",
// theme.colorScheme === "dark"
// ? theme.colors.dark[8]
// : theme.colors.gray[0],
},
})}>
<Outlet />
</AppShell>
</AppShell.Section>
</AppShell.Navbar>
)}
<Outlet />
</AppShell>
</MantineProvider>
);
}
const router = createBrowserRouter([
Expand Down
17 changes: 7 additions & 10 deletions examples/editor/src/style.css
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
.editor {
margin: 0 calc((100% - 731px) / 2);
margin-top: 8px;
/* height: 100%; */
body {
height: auto;
}

body {
margin: 0;
.editor {
margin: 8px calc((100% - 731px) / 2) 0;
}

/* .root {
height: 100%;
width: 100%;
} */
.mantine-AppShell-navbar {
background-color: #f7f7f5;
}
Loading