Skip to content

Commit 7d39de0

Browse files
committed
website: udpate example.
1 parent bb530bc commit 7d39de0

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

www/src/Example.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
import React, { Fragment } from 'react';
22
import rehypeSanitize, { defaultSchema } from 'rehype-sanitize';
33
import MDEditor, { MDEditorProps } from '@uiw/react-md-editor';
4+
import styled from 'styled-components';
5+
6+
const Toolbar = styled.div`
7+
padding-top: 10px;
8+
text-align: center;
9+
`;
410

511
let count = 1;
612

@@ -62,7 +68,7 @@ const Example = (props = {} as { mdStr: string }) => {
6268
setVisible({ ...state, value: newValue });
6369
}}
6470
/>
65-
<div className="doc-tools">
71+
<Toolbar>
6672
<label>
6773
<input
6874
type="checkbox"
@@ -123,6 +129,7 @@ const Example = (props = {} as { mdStr: string }) => {
123129
/>
124130
overflow
125131
</label>
132+
<br />
126133
<label>
127134
<input type="radio" name="preview" value="edit" checked={state.preview === 'edit'} onChange={upPreview} />
128135
Edit
@@ -161,7 +168,7 @@ const Example = (props = {} as { mdStr: string }) => {
161168
>
162169
Clear
163170
</button>
164-
</div>
171+
</Toolbar>
165172
</Fragment>
166173
);
167174
};

0 commit comments

Comments
 (0)