Skip to content

Commit

Permalink
doc: 官网添加可在线编辑文档
Browse files Browse the repository at this point in the history
  • Loading branch information
ChenlingasMx committed May 6, 2023
1 parent 0155d70 commit 5020231
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
Empty file.
11 changes: 4 additions & 7 deletions website/src/component/Preview/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { BackTop, Circle, Icon } from 'uiw';
import { getMetaId, isMeta, getURLParameters } from 'markdown-react-code-preview-loader';
import CodeLayout from 'react-code-preview-layout';
import { useRef } from 'react';
import Editor from './Footer';
import Footer from '../Footer';

const Wrapper = styled.div`
Expand Down Expand Up @@ -86,15 +87,11 @@ const Preview = ({ path, ...mdData }) => {
},
}}
/>
<Footer path={path} />
<Footer />
<Editor path={path} />
<BackTop speed={500}>
{({ percent, scrollToTop }) => (
<Circle
width={50}
onClick={() => scrollToTop()}
format={() => <Icon type="arrow-up" />}
percent={percent}
></Circle>
<Circle width={50} onClick={() => scrollToTop()} format={() => <Icon type="arrow-up" />} percent={percent} />
)}
</BackTop>
</Wrapper>
Expand Down
2 changes: 1 addition & 1 deletion website/src/pages/docs/awesome-react-native/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Preview from 'src/component/Preview';
import md from './README.md';

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

0 comments on commit 5020231

Please sign in to comment.