Skip to content

Commit 15df512

Browse files
committedOct 10, 2022
website: upgrade markdown preview example.
1 parent 19421f3 commit 15df512

File tree

144 files changed

+4621
-5703
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

144 files changed

+4621
-5703
lines changed
 

‎package.json

+9-9
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
"homepage": "https://uiwjs.github.io",
55
"private": true,
66
"scripts": {
7-
"lib": "lerna exec --scope @uiw/react-form -- tsbb build --target react",
8-
"lib:css": "lerna exec --scope @uiw/react-form -- compile-less -d src -o esm",
9-
"lib:css:dist": "lerna exec --scope @uiw/react-form -- compile-less -d src -o lib --combine=dist.css",
10-
"lib:css:watch": "lerna exec --scope @uiw/react-form -- compile-less -d src -o esm --watch",
11-
"lib:watch": "lerna exec --scope @uiw/react-form -- tsbb watch & npm run lib:css:watch",
12-
"lib:bootstrap": "lerna bootstrap --hoist --scope @uiw/react-form",
7+
"lib": "lerna exec --scope @uiw/react-descriptions -- tsbb build --target react",
8+
"lib:css": "lerna exec --scope @uiw/react-descriptions -- compile-less -d src -o esm",
9+
"lib:css:dist": "lerna exec --scope @uiw/react-descriptions -- compile-less -d src -o lib --combine=dist.css",
10+
"lib:css:watch": "lerna exec --scope @uiw/react-descriptions -- compile-less -d src -o esm --watch",
11+
"lib:watch": "lerna exec --scope @uiw/react-descriptions -- tsbb watch & npm run lib:css:watch",
12+
"lib:bootstrap": "lerna bootstrap --hoist --scope @uiw/react-descriptions",
1313
"lib:build": "npm run lib && npm run lib:css && npm run lib:css:dist",
1414
"//>>>>>>>>>>>>": "<<<<<<<<<<",
1515
"watch:other:lib": "lerna exec --parallel --scope @uiw/* --ignore @uiw/doc -- tsbb watch",
@@ -63,15 +63,15 @@
6363
"node": ">=16.0.0"
6464
},
6565
"devDependencies": {
66-
"@kkt/less-modules": "~7.1.1",
67-
"@kkt/ncc": "~1.0.8",
66+
"@kkt/less-modules": "~7.2.1",
67+
"@kkt/ncc": "~1.0.15",
6868
"@types/react": "~18.0.0",
6969
"@types/react-dom": "~18.0.0",
7070
"@types/react-test-renderer": "~18.0.0",
7171
"@types/react-transition-group": "~4.4.4",
7272
"compile-less-cli": "~1.8.11",
7373
"husky": "~7.0.4",
74-
"kkt": "~7.1.5",
74+
"kkt": "~7.2.1",
7575
"lerna": "~4.0.0",
7676
"lint-staged": "~12.3.4",
7777
"prettier": "~2.6.0",

‎packages/react-affix/README.md

+20-20
Original file line numberDiff line numberDiff line change
@@ -15,36 +15,36 @@ import Affix from '@uiw/react-affix';
1515

1616
### 基本用法
1717

18-
<!--rehype:bgWhite=true&codeSandbox=true&codePen=true-->
19-
```jsx
20-
import ReactDOM from 'react-dom';
18+
```jsx mdx:preview
19+
import React from 'react';
2120
import { Affix, Button } from 'uiw';
2221

23-
ReactDOM.render(
24-
<Affix offsetTop={60}>
25-
<Button type="primary">1 当按钮距离顶部距离为 0,按钮被钉在顶部</Button>
26-
</Affix>,
27-
_mount_
28-
);
22+
export default function Demo() {
23+
return (
24+
<Affix offsetTop={60}>
25+
<Button type="primary">1 当按钮距离顶部距离为 0,按钮被钉在顶部</Button>
26+
</Affix>
27+
)
28+
}
2929
```
3030

3131
### 钉在底部
3232

3333
这个实例需要你缩小窗口高度,就可以测试看效果啦。
3434

35-
<!--rehype:bgWhite=true&codeSandbox=true&codePen=true-->
36-
```jsx
37-
import ReactDOM from 'react-dom';
35+
```jsx mdx:preview
36+
import React from 'react';
3837
import { Affix, Button } from 'uiw';
3938

40-
ReactDOM.render(
41-
<Affix offsetBottom={10} onChange={(affixed) => {
42-
console.log('affixed::', affixed);
43-
}}>
44-
<Button type="primary" style={{ marginLeft: 20 }}>2 当按钮距离底部距离为 0,按钮被钉在底部</Button>
45-
</Affix>,
46-
_mount_
47-
);
39+
export default function Demo() {
40+
return (
41+
<Affix offsetBottom={10} onChange={(affixed) => {
42+
console.log('affixed::', affixed);
43+
}}>
44+
<Button type="primary" style={{ marginLeft: 20 }}>2 当按钮距离底部距离为 0,按钮被钉在底部</Button>
45+
</Affix>
46+
)
47+
}
4848
```
4949

5050
### Props

0 commit comments

Comments
 (0)
Please sign in to comment.