Skip to content

Commit 5020231

Browse files
committed
doc: 官网添加可在线编辑文档
1 parent 0155d70 commit 5020231

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

example/examples/.watchman-cookie-yuzhouwuditianxinjiang-2.local-1329-629

Whitespace-only changes.

website/src/component/Preview/index.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { BackTop, Circle, Icon } from 'uiw';
44
import { getMetaId, isMeta, getURLParameters } from 'markdown-react-code-preview-loader';
55
import CodeLayout from 'react-code-preview-layout';
66
import { useRef } from 'react';
7+
import Editor from './Footer';
78
import Footer from '../Footer';
89

910
const Wrapper = styled.div`
@@ -86,15 +87,11 @@ const Preview = ({ path, ...mdData }) => {
8687
},
8788
}}
8889
/>
89-
<Footer path={path} />
90+
<Footer />
91+
<Editor path={path} />
9092
<BackTop speed={500}>
9193
{({ percent, scrollToTop }) => (
92-
<Circle
93-
width={50}
94-
onClick={() => scrollToTop()}
95-
format={() => <Icon type="arrow-up" />}
96-
percent={percent}
97-
></Circle>
94+
<Circle width={50} onClick={() => scrollToTop()} format={() => <Icon type="arrow-up" />} percent={percent} />
9895
)}
9996
</BackTop>
10097
</Wrapper>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import Preview from 'src/component/Preview';
22
import md from './README.md';
33

4-
const DEMO = () => <Preview {...md} />;
4+
const DEMO = () => <Preview {...md} path="/website/src/pages/docs/awesome-react-native/README.md" />;
55
export default DEMO;

0 commit comments

Comments
 (0)