Skip to content

Commit f1c7a95

Browse files
author
rulishu
committed
fix(Divider): 修改Divider MarkDown为函数组件
1 parent 708df71 commit f1c7a95

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

packages/core/src/Divider/README.md

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ import React,{Component, Fragment } from "react"
1010
import { View, Text } from 'react-native';
1111
import { Divider } from '@uiw/react-native';
1212

13-
class Demo extends Component {
14-
render() {
13+
function Demo() {
1514
return (
1615
<Fragment>
1716
<Text>分割线</Text>
@@ -21,7 +20,6 @@ class Demo extends Component {
2120
<Text>分割线</Text>
2221
</Fragment>
2322
);
24-
}
2523
}
2624
export default Demo
2725

@@ -36,8 +34,7 @@ import React,{Component, Fragment } from "react"
3634
import { View, Text } from 'react-native';
3735
import { Divider } from '@uiw/react-native';
3836

39-
class Demo extends Component {
40-
render() {
37+
function Demo() {
4138
return (
4239
<Fragment>
4340
<Text>分割线</Text>
@@ -46,7 +43,6 @@ class Demo extends Component {
4643
<Divider label="OR" gutter={100}/>
4744
</Fragment>
4845
);
49-
}
5046
}
5147
export default Demo
5248

@@ -59,8 +55,7 @@ import React,{Component, Fragment } from "react"
5955
import { View, Text } from 'react-native';
6056
import { Divider } from '@uiw/react-native';
6157

62-
class Demo extends Component {
63-
render() {
58+
function Demo() {
6459
return (
6560
<Fragment>
6661
<Text>分割线</Text>
@@ -71,7 +66,6 @@ class Demo extends Component {
7166
<Divider label="right" orientation="right" labelStyle={{ fontWeight: 'bold' }} />
7267
</Fragment>
7368
);
74-
}
7569
}
7670
export default Demo
7771

@@ -84,14 +78,12 @@ import React,{Component} from "react"
8478
import { View, Text } from 'react-native';
8579
import { Divider } from '@uiw/react-native';
8680

87-
class Demo extends Component {
88-
render() {
81+
function Demo() {
8982
return (
9083
<View style={{ height: 200 }}>
9184
<Divider type="vertical" label="OR" />
9285
</View>
9386
);
94-
}
9587
}
9688
export default Demo
9789

0 commit comments

Comments
 (0)