Skip to content

Commit 70c90e7

Browse files
ffff
authored andcommitted
docs: 优化Badge文档
1 parent 8f127e5 commit 70c90e7

File tree

1 file changed

+26
-2
lines changed

1 file changed

+26
-2
lines changed

packages/core/src/Badge/README.md

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
Badge 标记
22
---
33

4-
![](https://user-images.githubusercontent.com/57083007/137631808-f3899eb4-69c1-4dd5-a686-0f8bb38fe4b6.png)<!--rehype:style=zoom: 33%;float: right; margin-left: 15px;-->
54

65
### 基础示例
76

8-
```jsx
7+
8+
```jsx mdx:preview
9+
import React from "react"
910
import { View, Text } from 'react-native';
1011
import { Badge } from '@uiw/react-native';
1112

@@ -17,6 +18,29 @@ function Demo() {
1718
</View>
1819
);
1920
}
21+
22+
export default Demo;
23+
24+
```
25+
### 设置类型
26+
27+
28+
```jsx mdx:preview
29+
import React from "react"
30+
import { View, Text } from 'react-native';
31+
import { Badge } from '@uiw/react-native';
32+
33+
function Demo() {
34+
return (
35+
<View style={{ flexDirection: 'row' }}>
36+
<Text>一文带你搞懂 API 网关</Text>
37+
<Badge text="标记" type="dot" color="skyblue" />
38+
</View>
39+
);
40+
}
41+
42+
export default Demo;
43+
2044
```
2145

2246
### Props

0 commit comments

Comments
 (0)