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() {
1717}
1818```
1919
20- ## props
20+ ## Props
2121
2222继承 [ View] ( https://facebook.github.io/react-native/docs/view#props ) 组件。
2323
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({
2626
2727export interface BadgeProps extends ViewProps {
2828 children ?: React . ReactNode ;
29+ /** 标记颜色 */
2930 color ?: colors . Colors | string ;
31+ /** 文本内容 */
3032 text ?: string | Element ;
3133 /**
3234 * 设置圆角,默认 `12`
3335 */
3436 rounded ?: number ;
37+ /** 设置类型 */
3538 type ?: 'dot' | 'text' ;
39+ /** 文本样式 */
3640 textStyles ?: StyleProp < TextStyle > ;
3741}
3842
You can’t perform that action at this time.
0 commit comments