Skip to content

Commit f4355cc

Browse files
committed
website: add backToUp button.
1 parent 84d0e93 commit f4355cc

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,17 +53,18 @@
5353
"@kkt/scope-plugin-options": "^7.2.0",
5454
"@types/react": "^18.0.14",
5555
"@types/react-dom": "^18.0.5",
56+
"@uiw/react-back-to-top": "^1.1.1",
5657
"@uiw/react-github-corners": "^1.5.14",
5758
"@uiw/reset.css": "^1.0.6",
5859
"@wcj/dark-mode": "^1.0.14",
5960
"compile-less-cli": "^1.8.13",
61+
"husky": "^8.0.1",
6062
"kkt": "^7.2.0",
6163
"prettier": "^2.7.1",
6264
"pretty-quick": "~3.1.3",
6365
"react": "^18.2.0",
6466
"react-dom": "^18.2.0",
65-
"tsbb": "^3.7.6",
66-
"husky": "^8.0.1"
67+
"tsbb": "^3.7.6"
6768
},
6869
"browserslist": {
6970
"production": [

website/App.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
import MarkdownEditor from '../';
21
import { useState } from 'react';
2+
import BackToUp from '@uiw/react-back-to-top';
3+
import GithubCorner from '@uiw/react-github-corners';
4+
import MarkdownPreview from '@uiw/react-markdown-preview';
35
import '@wcj/dark-mode';
46
import DocumentStr from '../README.md';
7+
import MarkdownEditor from '../';
58
import styles from './App.module.less';
69
import Footer from './components/Footer';
7-
import GithubCorner from '@uiw/react-github-corners';
8-
import MarkdownPreview from '@uiw/react-markdown-preview';
910
import { ReactComponent as Logo } from './logo.svg';
1011

1112
const DocumentStrSource = DocumentStr.replace(/([\s\S]*)<!--dividing-->/, '').replace(/^\n*/g, '');
@@ -17,6 +18,7 @@ export default function App() {
1718
const [hideToolbar, setHideToolbar] = useState(true);
1819
return (
1920
<div className={styles.warpper}>
21+
<BackToUp>Top</BackToUp>
2022
<dark-mode light="Light" dark="Dart" style={{ position: 'fixed' }}></dark-mode>
2123
<GithubCorner fixed target="__blank" href="https://github.com/uiwjs/react-markdown-editor" />
2224
<div className={styles.logo}>

0 commit comments

Comments
 (0)