Skip to content

Commit 1dfbab5

Browse files
author
hy
committed
fix(VerificationCode&Progress):优化VerificationCode和Progress文档
1 parent ccde846 commit 1dfbab5

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

packages/core/src/Progress/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@ import { View, Text, Animated } from 'react-native';
33
import Svg, { Circle, G, Line, Rect, Defs, LinearGradient, Stop } from 'react-native-svg';
44

55
interface ProgressProps {
6+
/**设置是进度条还是进度圈*/
67
type: 'line' | 'circle';
78
/**设置进度圈大小,进度条长度*/
89
width?: number;
9-
/**颜色 */
10+
/**颜色 支持渐变色*/
1011
color?: string | [string, string];
1112
/**背景色 */
1213
bgColor?: string;
@@ -22,6 +23,7 @@ interface ProgressProps {
2223
showUnit?: boolean;
2324
/**自定义文本位置 */
2425
top?: string;
26+
/**自定义文本位置 */
2527
left?: string;
2628
}
2729

packages/core/src/VerificationCode/index.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,27 @@ import { useTheme } from '@shopify/restyle';
99
interface VerificationCodeProps {
1010
/**是否展示按钮边框 */
1111
bordered?: boolean;
12+
/**自定义验证码文字 */
1213
label?: string;
14+
/**自定义重新发送文字 */
1315
resendLabel?: string;
16+
/**默认倒计时秒数 */
1417
count?: number;
18+
/**验证码值 */
1519
value?: string;
20+
/**输入改变事件 */
1621
onChange?: (value: string) => void;
22+
/**发验证码之前的回调 */
1723
onBefore?: () => Promise<boolean>;
24+
/**发验证码时的回调 */
1825
onSend?: () => Promise<boolean>;
26+
/**发验证码之后的回调 */
1927
onEnd?: () => void;
28+
/**输入框外层自定义样式 */
2029
outerStyle?: StyleProp<ViewStyle>;
30+
/**按钮自定义样式 */
2131
buttonStyle?: StyleProp<ViewStyle>;
32+
/**输入框空白时自定义展示 */
2233
placeholder?: string;
2334
}
2435

0 commit comments

Comments
 (0)