File tree Expand file tree Collapse file tree 2 files changed +24
-7
lines changed Expand file tree Collapse file tree 2 files changed +24
-7
lines changed Original file line number Diff line number Diff line change @@ -17,13 +17,26 @@ function Demo() {
17
17
}
18
18
```
19
19
20
- ## props
20
+ ## Props
21
21
22
22
继承 [ View] ( https://facebook.github.io/react-native/docs/view#props ) 组件。
23
23
24
- | 参数 | 说明 | 类型 | 默认值 |
25
- | ------| ------| -----| ------|
26
- | ` text ` | 文本内容 | String | - |
27
- | ` color ` | 标记颜色 | String | - |
28
- | ` rounded ` | 设置圆角 | Number | ` 5 ` |
29
- | ` textStyles ` | 文本样式 | String | - |
24
+ ``` ts
25
+ import { ViewProps } from ' react-native' ;
26
+
27
+ export interface BadgeProps extends ViewProps {
28
+ children? : React .ReactNode ;
29
+ /** 标记颜色 */
30
+ color? : colors .Colors | string ;
31
+ /** 文本内容 */
32
+ text? : string | Element ;
33
+ /**
34
+ * 设置圆角,默认 `12`
35
+ */
36
+ rounded? : number ;
37
+ /** 设置类型 */
38
+ type? : ' dot' | ' text' ;
39
+ /** 文本样式 */
40
+ textStyles? : StyleProp <TextStyle >;
41
+ }
42
+ ```
Original file line number Diff line number Diff line change @@ -26,13 +26,17 @@ const styles = StyleSheet.create({
26
26
27
27
export interface BadgeProps extends ViewProps {
28
28
children ?: React . ReactNode ;
29
+ /** 标记颜色 */
29
30
color ?: colors . Colors | string ;
31
+ /** 文本内容 */
30
32
text ?: string | Element ;
31
33
/**
32
34
* 设置圆角,默认 `12`
33
35
*/
34
36
rounded ?: number ;
37
+ /** 设置类型 */
35
38
type ?: 'dot' | 'text' ;
39
+ /** 文本样式 */
36
40
textStyles ?: StyleProp < TextStyle > ;
37
41
}
38
42
You can’t perform that action at this time.
0 commit comments