Skip to content

Commit b761cec

Browse files
update
1 parent 5fe5a0d commit b761cec

File tree

7 files changed

+61
-60
lines changed

7 files changed

+61
-60
lines changed

pnpm-lock.yaml

+26-26
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ui/react-example/package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@
1010
"preview": "vite preview"
1111
},
1212
"dependencies": {
13-
"@codesandbox/sandpack-react": "^2.19.10",
13+
"@codesandbox/sandpack-react": "^2.20.0",
1414
"@git-diff-view/file": "workspace:*",
1515
"@git-diff-view/react": "workspace:*",
1616
"@git-diff-view/shiki": "workspace:*",
1717
"@git-diff-view/vue": "workspace:*",
18-
"@mantine/core": "^7.15.1",
19-
"@mantine/hooks": "^7.15.1",
18+
"@mantine/core": "^7.17.1",
19+
"@mantine/hooks": "^7.17.1",
2020
"@my-react/react": "^0.3.6",
2121
"@my-react/react-dom": "^0.3.6",
22-
"@tabler/icons-react": "^3.26.0",
22+
"@tabler/icons-react": "^3.31.0",
2323
"lodash": "^4.17.21",
2424
"overlayscrollbars": "^2.10.0",
2525
"react": "^18.2.0",

ui/react-example/src/App.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { AppShell, Group, Title, Button, Flex, Burger, Space, useMantineColorScheme, em } from "@mantine/core";
22
import { useDisclosure } from "@mantine/hooks";
3-
import { IconMoon, IconSun } from "@tabler/icons-react";
3+
import { IconBrandGithub, IconMoon, IconSun } from "@tabler/icons-react";
44

55
import { DevTool } from "./components/DevTool";
66
import { ExampleContent } from "./components/ExampleContent";
@@ -56,7 +56,7 @@ function App() {
5656
href="https://github.com/MrWangJustToDo/git-diff-view"
5757
target="_blank"
5858
>
59-
<Github className="!w-[1.42em] text-gray-400" />
59+
<IconBrandGithub className="text-gray-400" />
6060
</Button>
6161
<Button variant="light" className="text-sm" onClick={toggleColorScheme} color="violet">
6262
{colorScheme === "light" ? (
+26-19
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { Button } from "@mantine/core";
1+
import { Button, ButtonGroup } from "@mantine/core";
2+
import { IconX } from "@tabler/icons-react";
23
import { useState } from "react";
34

45
const src = "https://mrwangjusttodo.github.io/myreact-devtools";
@@ -25,26 +26,32 @@ async function init() {
2526
}
2627

2728
export const DevTool = () => {
29+
const [hide, setHide] = useState(false);
30+
2831
const [open, setOpen] = useState(false);
2932

3033
return (
31-
<Button
32-
className="fixed bottom-16 left-4 z-50"
33-
color="red"
34-
size="md"
35-
onClick={async () => {
36-
if (!open) {
37-
await init();
38-
39-
setOpen(true);
40-
} else {
41-
getFunc()?.["close"]?.();
42-
43-
setOpen(false);
44-
}
45-
}}
46-
>
47-
{!open ? "Open" : "Close"} DevTool
48-
</Button>
34+
<ButtonGroup className="fixed bottom-16 left-4 z-50" style={{ display: hide ? "none" : undefined }}>
35+
<Button
36+
color="red"
37+
size="md"
38+
onClick={async () => {
39+
if (!open) {
40+
await init();
41+
42+
setOpen(true);
43+
} else {
44+
getFunc()?.["close"]?.();
45+
46+
setOpen(false);
47+
}
48+
}}
49+
>
50+
{!open ? "Open" : "Close"} DevTool
51+
</Button>
52+
<Button size="md" className="px-2" variant="light" onClick={() => setHide(true)}>
53+
<IconX />
54+
</Button>
55+
</ButtonGroup>
4956
);
5057
};

ui/react-example/src/components/VuePlayGround.tsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ import {
77
SandpackProvider,
88
} from "@codesandbox/sandpack-react";
99
import { Box, Card, useMantineColorScheme } from "@mantine/core";
10+
import { IconBrandVue } from "@tabler/icons-react";
1011

11-
import { Vue } from "./icons";
12+
// import { Vue } from "./icons";
1213
import { f1, f2 } from "./ReactPlayGround";
1314

1415
export const VuePlayGround = () => {
@@ -17,7 +18,7 @@ export const VuePlayGround = () => {
1718
return (
1819
<Card className="p-0" withBorder>
1920
<Box className="flex items-center px-2 py-2 font-sans text-[14px]">
20-
<Vue width="16" className="vue-icon mr-2" /> Vue
21+
<IconBrandVue size="16" color="#42b883" className="mr-2" />Vue
2122
</Box>
2223
<SandpackProvider
2324
template="vite-vue-ts"

ui/react-example/src/components/icons/Vue.tsx

-6
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
export * from "./Github";
2-
export * from "./Vue";

0 commit comments

Comments
 (0)