Skip to content

Commit fbdcab5

Browse files
update readme
1 parent fc2c11e commit fbdcab5

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

4.png

391 KB
Loading

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ a React/Vue component to show the `git diff`/`file diff` result, just like Githu
1313

1414
![file mode](fileMode.png)
1515

16+
[GitHub compare](https://mrwangjusttodo.github.io/MrWangJustToDo.io?overlay=open&playGround=GitHub)
17+
18+
![GitHub compare](4.png)
19+
1620
## Packages
1721

1822
| Package | Version |

ui/react-example/src/Example.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ export function Example() {
361361
<div className="w-[90%] m-auto mb-[1em] mt-[1em]">
362362
<h2 className=" text-[24px]">
363363
A <code className=" bg-slate-100 px-[4px] rounded-sm">React</code> /{" "}
364-
<code className="bg-slate-100 px-[4px] rounded-sm">Vue</code> component to show the file diff (like Github)
364+
<code className="bg-slate-100 px-[4px] rounded-sm">Vue</code> component to show the file/git diff
365365
</h2>
366366
<br />
367367
<p>
@@ -383,21 +383,21 @@ export function Example() {
383383
className="bg-sky-400 hover:bg-sky-500 px-5 py-2 text-sm leading-5 rounded-full font-semibold text-white"
384384
onClick={() => setEnableVUE(!enableVUE)}
385385
>
386-
{enableVUE ? "disable Vue" : "enable Vue"}
386+
{enableVUE ? "Disable Vue" : "Enable Vue"}
387387
</button>
388388
{!wrap && (
389389
<button
390390
className="bg-sky-400 hover:bg-sky-500 px-5 py-2 text-sm leading-5 rounded-full font-semibold text-white"
391391
onClick={() => setScrollBar(!scrollBar)}
392392
>
393-
{scrollBar ? "toggle to disable scrollbar" : "toggle to enable scrollbar"}
393+
{scrollBar ? "Toggle to disable scrollbar" : "Toggle to enable scrollbar"}
394394
</button>
395395
)}
396396
<button
397397
className="bg-sky-400 hover:bg-sky-500 px-5 py-2 text-sm leading-5 rounded-full font-semibold text-white"
398398
onClick={() => setExpandAll(!expandAll)}
399399
>
400-
{expandAll ? "toggle to collapseAll" : "toggle to expandAll"}
400+
{expandAll ? "Toggle to collapseAll" : "Toggle to expandAll"}
401401
</button>
402402
<button
403403
className="bg-sky-400 hover:bg-sky-500 px-5 py-2 text-sm leading-5 rounded-full font-semibold text-white"

ui/react-example/src/PlayGround.tsx

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const _PlayGroundGitDiff = ({ onClick }: { onClick: () => void }) => {
4747
return (
4848
<div className="w-[90%] m-auto mt-[1em] mb-[1em]">
4949
<h2 className="text-[24px]">
50-
PlayGround -- input a `git diff` string
50+
PlayGround -- provide a `git diff` string
5151
<div className="ml-4 text-[14px] inline-block">
5252
<Button onClick={onClick}>go to `file mode`</Button>
5353
</div>
@@ -91,9 +91,7 @@ const _PlayGroundGitDiff = ({ onClick }: { onClick: () => void }) => {
9191
diffViewWrap
9292
/>
9393
) : (
94-
<div className="border mt-[10px] rounded-[4px] p-[10px] text-orange-500 text-[22px]">
95-
try to give a `git diff` input, and see the result
96-
</div>
94+
<div className="border mt-[10px] rounded-[4px] p-[10px] text-orange-500 text-[22px]">Empty</div>
9795
)}
9896
</div>
9997
);
@@ -139,7 +137,7 @@ const _PlayGroundFileDiff = ({ onClick }: { onClick: () => void }) => {
139137
return (
140138
<div className="w-[90%] m-auto mt-[1em] mb-[1em]">
141139
<h2 className="text-[24px]">
142-
PlayGround -- provider two file
140+
PlayGround -- provide two file content
143141
<div className="ml-4 text-[14px] inline-block">
144142
<Button onClick={onClick}>go to `git mode`</Button>
145143
</div>
@@ -196,9 +194,7 @@ const _PlayGroundFileDiff = ({ onClick }: { onClick: () => void }) => {
196194
diffViewWrap
197195
/>
198196
) : (
199-
<div className="border mt-[10px] rounded-[4px] p-[10px] text-orange-500 text-[22px]">
200-
Provider two file content, and see the result
201-
</div>
197+
<div className="border mt-[10px] rounded-[4px] p-[10px] text-orange-500 text-[22px]">Empty</div>
202198
)}
203199
</div>
204200
);

0 commit comments

Comments
 (0)