Skip to content

Commit 16dbcdb

Browse files
committed
website: document display version information.
1 parent e535e8f commit 16dbcdb

File tree

2 files changed

+21
-13
lines changed

2 files changed

+21
-13
lines changed

website/App.module.less

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,10 @@ html {
1818
font-size: 26px;
1919
margin-bottom: 26px;
2020
text-align: center;
21+
sup {
22+
font-size: 14px;
23+
color: #939393;
24+
position: absolute;
25+
padding-left: 5px;
26+
}
2127
}

website/App.tsx

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,19 @@ import DocumentStr from '../README.md';
55
import styles from './App.module.less';
66
import Example from './Example';
77

8-
export default class App extends React.PureComponent<{}, {}> {
9-
render() {
10-
let DocumentStrSource = DocumentStr;
11-
if (DocumentStrSource) DocumentStrSource = DocumentStr.replace(/([\s\S]*)<!--dividing-->/, '');
12-
return (
13-
<div className={styles.warpper}>
14-
<GitHubCorners fixed href="https://github.com/uiwjs/react-code-preview" target="__blank" />
15-
<h1 className={styles.title}>React Code Preview</h1>
16-
<Example />
17-
<Markdown style={{ paddingTop: 25 }} source={DocumentStrSource} />
18-
</div>
19-
);
20-
}
8+
export default function App() {
9+
// @ts-ignore
10+
const version = VERSION;
11+
let DocumentStrSource = DocumentStr;
12+
if (DocumentStrSource) DocumentStrSource = DocumentStr.replace(/([\s\S]*)<!--dividing-->/, '');
13+
return (
14+
<div className={styles.warpper}>
15+
<GitHubCorners fixed href="https://github.com/uiwjs/react-code-preview" target="__blank" />
16+
<h1 className={styles.title}>
17+
React Code Preview <sup>{version}</sup>
18+
</h1>
19+
<Example />
20+
<Markdown style={{ paddingTop: 25 }} source={DocumentStrSource} />
21+
</div>
22+
);
2123
}

0 commit comments

Comments
 (0)