1 | import * as React from 'react';
|
2 | import {
|
3 | ViewStyle,
|
4 | TextStyle,
|
5 | ImageStyle,
|
6 | ImageSourcePropType,
|
7 | ImageURISource,
|
8 | TouchableWithoutFeedbackProps,
|
9 | TouchableOpacityProps,
|
10 | TouchableNativeFeedbackProps,
|
11 | ViewProperties,
|
12 | TextInputProperties,
|
13 | TextInput,
|
14 | TextProperties,
|
15 | StatusBarProperties,
|
16 | StyleProp,
|
17 | Animated,
|
18 | ActivityIndicatorProperties,
|
19 | SwitchProperties,
|
20 | StatusBarStyle,
|
21 | ModalProps,
|
22 | TextInputProps,
|
23 | ImageProps as RNImageProps,
|
24 | TouchableHighlightProps,
|
25 | PressableProps,
|
26 | } from 'react-native';
|
27 | import { RatingProps, AirbnbRatingProps } from 'react-native-ratings';
|
28 | import {
|
29 | IconButtonProps,
|
30 | IconProps as VectorIconProps,
|
31 | } from 'react-native-vector-icons/Icon';
|
32 |
|
33 | export interface TouchableComponent
|
34 | extends TouchableHighlightProps,
|
35 | PressableProps {}
|
36 |
|
37 |
|
38 |
|
39 |
|
40 | export type IconType =
|
41 | | 'material'
|
42 | | 'material-community'
|
43 | | 'simple-line-icon'
|
44 | | 'zocial'
|
45 | | 'font-awesome'
|
46 | | 'octicon'
|
47 | | 'ionicon'
|
48 | | 'foundation'
|
49 | | 'evilicon'
|
50 | | 'entypo'
|
51 | | 'antdesign'
|
52 | | 'font-awesome-5'
|
53 | | string;
|
54 |
|
55 | export interface IconObject extends TouchableComponent {
|
56 | name?: string;
|
57 | color?: string;
|
58 | size?: number;
|
59 | type?: IconType;
|
60 | style?: StyleProp<TextStyle>;
|
61 | }
|
62 |
|
63 | export interface AvatarIcon extends IconObject {
|
64 | iconStyle?: StyleProp<TextStyle>;
|
65 | }
|
66 |
|
67 | export interface TextProps extends TextProperties {
|
68 | |
69 |
|
70 |
|
71 | h1?: boolean;
|
72 |
|
73 | |
74 |
|
75 |
|
76 | h2?: boolean;
|
77 |
|
78 | |
79 |
|
80 |
|
81 | h3?: boolean;
|
82 |
|
83 | |
84 |
|
85 |
|
86 | h4?: boolean;
|
87 |
|
88 | |
89 |
|
90 |
|
91 | h1Style?: StyleProp<TextStyle>;
|
92 |
|
93 | |
94 |
|
95 |
|
96 | h2Style?: StyleProp<TextStyle>;
|
97 |
|
98 | |
99 |
|
100 |
|
101 | h3Style?: StyleProp<TextStyle>;
|
102 |
|
103 | |
104 |
|
105 |
|
106 | h4Style?: StyleProp<TextStyle>;
|
107 |
|
108 | |
109 |
|
110 |
|
111 | style?: StyleProp<TextStyle>;
|
112 | }
|
113 |
|
114 |
|
115 |
|
116 |
|
117 |
|
118 | export class Text extends React.Component<TextProps, any> {}
|
119 |
|
120 | export interface AvatarProps {
|
121 | |
122 |
|
123 |
|
124 |
|
125 |
|
126 | Component?: React.ComponentClass;
|
127 |
|
128 | |
129 |
|
130 |
|
131 | onAccessoryPress?(): void;
|
132 |
|
133 | |
134 |
|
135 |
|
136 | onPress?(): void;
|
137 |
|
138 | |
139 |
|
140 |
|
141 | onLongPress?(): void;
|
142 |
|
143 | |
144 |
|
145 |
|
146 | containerStyle?: StyleProp<ViewStyle>;
|
147 |
|
148 | |
149 |
|
150 |
|
151 | source?: ImageSourcePropType;
|
152 |
|
153 | |
154 |
|
155 |
|
156 | avatarStyle?: ImageStyle;
|
157 |
|
158 | |
159 |
|
160 |
|
161 |
|
162 |
|
163 | rounded?: boolean;
|
164 |
|
165 | |
166 |
|
167 |
|
168 | title?: string;
|
169 |
|
170 | |
171 |
|
172 |
|
173 | titleStyle?: StyleProp<TextStyle>;
|
174 |
|
175 | |
176 |
|
177 |
|
178 | overlayContainerStyle?: StyleProp<ViewStyle>;
|
179 |
|
180 | |
181 |
|
182 |
|
183 |
|
184 |
|
185 | activeOpacity?: number;
|
186 |
|
187 | |
188 |
|
189 |
|
190 |
|
191 |
|
192 | showAccessory?: boolean;
|
193 |
|
194 | |
195 |
|
196 |
|
197 |
|
198 |
|
199 | accessory?: Partial<IconProps> & Partial<ImageProps>;
|
200 |
|
201 | |
202 |
|
203 |
|
204 | placeholderStyle?: StyleProp<ViewStyle>;
|
205 |
|
206 | |
207 |
|
208 |
|
209 | renderPlaceholderContent?: React.ReactElement<{}>;
|
210 |
|
211 | |
212 |
|
213 |
|
214 | icon?: AvatarIcon;
|
215 |
|
216 | |
217 |
|
218 |
|
219 | iconStyle?: StyleProp<TextStyle>;
|
220 |
|
221 | |
222 |
|
223 |
|
224 | imageProps?: Partial<ImageProps>;
|
225 |
|
226 | |
227 |
|
228 |
|
229 |
|
230 |
|
231 | size?: 'small' | 'medium' | 'large' | 'xlarge' | number;
|
232 |
|
233 | |
234 |
|
235 |
|
236 |
|
237 |
|
238 | ImageComponent?: React.ComponentClass;
|
239 | }
|
240 |
|
241 |
|
242 |
|
243 |
|
244 |
|
245 | export class Avatar extends React.Component<AvatarProps> {}
|
246 |
|
247 | export interface ButtonProps
|
248 | extends TouchableOpacityProps,
|
249 | TouchableNativeFeedbackProps {
|
250 | |
251 |
|
252 |
|
253 |
|
254 |
|
255 | TouchableComponent?: React.ComponentClass;
|
256 |
|
257 | |
258 |
|
259 |
|
260 |
|
261 |
|
262 |
|
263 | ViewComponent?: React.ComponentClass<any>;
|
264 |
|
265 | |
266 |
|
267 |
|
268 |
|
269 |
|
270 | buttonStyle?: StyleProp<ViewStyle>;
|
271 |
|
272 | |
273 |
|
274 |
|
275 | title?: string;
|
276 |
|
277 | |
278 |
|
279 |
|
280 |
|
281 |
|
282 | iconRight?: boolean;
|
283 |
|
284 | |
285 |
|
286 |
|
287 | icon?: IconNode;
|
288 |
|
289 | |
290 |
|
291 |
|
292 | iconContainerStyle?: StyleProp<ViewStyle>;
|
293 |
|
294 | |
295 |
|
296 |
|
297 | titleStyle?: StyleProp<TextStyle>;
|
298 |
|
299 | |
300 |
|
301 |
|
302 | titleProps?: TextProperties;
|
303 |
|
304 | |
305 |
|
306 |
|
307 |
|
308 |
|
309 | containerStyle?: StyleProp<ViewStyle>;
|
310 |
|
311 | |
312 |
|
313 |
|
314 |
|
315 |
|
316 | loading?: boolean;
|
317 |
|
318 | |
319 |
|
320 |
|
321 | loadingStyle?: StyleProp<ViewStyle>;
|
322 |
|
323 | |
324 |
|
325 |
|
326 | loadingProps?: ActivityIndicatorProperties;
|
327 |
|
328 | |
329 |
|
330 |
|
331 | linearGradientProps?: Object;
|
332 |
|
333 | |
334 |
|
335 |
|
336 |
|
337 |
|
338 | type?: 'solid' | 'clear' | 'outline';
|
339 |
|
340 | |
341 |
|
342 |
|
343 |
|
344 |
|
345 | disabled?: boolean;
|
346 |
|
347 | |
348 |
|
349 |
|
350 | disabledTitleStyle?: StyleProp<TextStyle>;
|
351 |
|
352 | |
353 |
|
354 |
|
355 | disabledStyle?: StyleProp<ViewStyle>;
|
356 |
|
357 | |
358 |
|
359 |
|
360 |
|
361 |
|
362 | raised?: boolean;
|
363 | }
|
364 |
|
365 |
|
366 |
|
367 |
|
368 |
|
369 | export class Button extends React.Component<ButtonProps, any> {}
|
370 |
|
371 | export interface BadgeProps {
|
372 | |
373 |
|
374 |
|
375 |
|
376 |
|
377 | value?: React.ReactNode;
|
378 |
|
379 | |
380 |
|
381 |
|
382 | badgeStyle?: StyleProp<ViewStyle>;
|
383 |
|
384 | |
385 |
|
386 |
|
387 | containerStyle?: StyleProp<ViewStyle>;
|
388 |
|
389 | |
390 |
|
391 |
|
392 | textStyle?: StyleProp<TextStyle>;
|
393 |
|
394 | |
395 |
|
396 |
|
397 | textProps?: TextProperties;
|
398 |
|
399 | |
400 |
|
401 |
|
402 |
|
403 |
|
404 | Component?: React.ComponentClass;
|
405 |
|
406 | |
407 |
|
408 |
|
409 |
|
410 |
|
411 | status?: 'primary' | 'success' | 'warning' | 'error';
|
412 |
|
413 | |
414 |
|
415 |
|
416 | onPress?(): void;
|
417 | }
|
418 |
|
419 |
|
420 |
|
421 |
|
422 |
|
423 | export class Badge extends React.Component<BadgeProps> {}
|
424 |
|
425 |
|
426 |
|
427 |
|
428 |
|
429 |
|
430 |
|
431 | export function withBadge(
|
432 | |
433 |
|
434 |
|
435 | value?: React.ReactNode | (() => React.ReactNode),
|
436 | |
437 |
|
438 |
|
439 | options?: {
|
440 | bottom?: number;
|
441 | left?: number;
|
442 | right?: number;
|
443 | top?: number;
|
444 | hidden?: boolean;
|
445 | containerStyle?: StyleProp<ViewStyle>;
|
446 | } & BadgeProps
|
447 | ): <P = {}>(WrappedComponent: React.ComponentType<P>) => React.ComponentType<P>;
|
448 |
|
449 | export interface BottomSheetProps {
|
450 | |
451 |
|
452 |
|
453 |
|
454 |
|
455 | isVisible: boolean;
|
456 |
|
457 | |
458 |
|
459 |
|
460 |
|
461 |
|
462 | modalProps: ModalProps;
|
463 | }
|
464 |
|
465 |
|
466 |
|
467 |
|
468 |
|
469 | export class BottomSheet extends React.Component<BottomSheetProps> {}
|
470 |
|
471 | export interface CardProps {
|
472 | |
473 |
|
474 |
|
475 | containerStyle?: StyleProp<ViewStyle>;
|
476 |
|
477 | |
478 |
|
479 |
|
480 | wrapperStyle?: StyleProp<ViewStyle>;
|
481 |
|
482 | |
483 |
|
484 |
|
485 | title?: string | React.ReactElement<{}>;
|
486 |
|
487 | |
488 |
|
489 |
|
490 | titleStyle?: StyleProp<TextStyle>;
|
491 |
|
492 | |
493 |
|
494 |
|
495 |
|
496 | featuredTitle?: string;
|
497 |
|
498 | |
499 |
|
500 |
|
501 | featuredTitleStyle?: StyleProp<TextStyle>;
|
502 |
|
503 | |
504 |
|
505 |
|
506 |
|
507 | featuredSubtitle?: string;
|
508 |
|
509 | |
510 |
|
511 |
|
512 | featuredSubtitleStyle?: StyleProp<TextStyle>;
|
513 |
|
514 | |
515 |
|
516 |
|
517 |
|
518 | dividerStyle?: StyleProp<ViewStyle>;
|
519 |
|
520 | |
521 |
|
522 |
|
523 | imageStyle?: ImageStyle;
|
524 |
|
525 | |
526 |
|
527 |
|
528 | imageWrapperStyle?: StyleProp<ViewStyle>;
|
529 |
|
530 | |
531 |
|
532 |
|
533 | image?: ImageSourcePropType;
|
534 |
|
535 | |
536 |
|
537 |
|
538 | imageProps?: Partial<ImageProps>;
|
539 | }
|
540 |
|
541 |
|
542 |
|
543 |
|
544 |
|
545 | export class Card extends React.Component<CardProps> {}
|
546 |
|
547 |
|
548 |
|
549 |
|
550 | export interface ElementObject {
|
551 | element: React.ReactElement<{}> | React.ReactType;
|
552 | }
|
553 |
|
554 |
|
555 |
|
556 |
|
557 | export interface InnerBorderStyleProperty {
|
558 | color?: string;
|
559 | width?: number;
|
560 | }
|
561 |
|
562 | export interface ButtonGroupProps {
|
563 | |
564 |
|
565 |
|
566 |
|
567 |
|
568 | selectMultiple?: boolean;
|
569 |
|
570 | |
571 |
|
572 |
|
573 | selectedIndex?: number | null;
|
574 |
|
575 | |
576 |
|
577 |
|
578 |
|
579 |
|
580 | selectedIndexes?: number[];
|
581 |
|
582 | |
583 |
|
584 |
|
585 | buttons: string[] | ElementObject[];
|
586 |
|
587 | |
588 |
|
589 |
|
590 |
|
591 |
|
592 | Component?: React.ComponentType<any>;
|
593 |
|
594 | |
595 |
|
596 |
|
597 | containerStyle?: StyleProp<ViewStyle>;
|
598 |
|
599 | |
600 |
|
601 |
|
602 | buttonContainerStyle?: StyleProp<ViewStyle>;
|
603 |
|
604 | |
605 |
|
606 |
|
607 | buttonStyle?: StyleProp<ViewStyle>;
|
608 |
|
609 | |
610 |
|
611 |
|
612 |
|
613 |
|
614 | selectedButtonStyle?: StyleProp<ViewStyle>;
|
615 |
|
616 | |
617 |
|
618 |
|
619 | textStyle?: StyleProp<TextStyle>;
|
620 |
|
621 | |
622 |
|
623 |
|
624 | selectedTextStyle?: StyleProp<TextStyle>;
|
625 |
|
626 | |
627 |
|
628 |
|
629 | innerBorderStyle?: InnerBorderStyleProperty;
|
630 |
|
631 | |
632 |
|
633 |
|
634 |
|
635 |
|
636 | underlayColor?: string;
|
637 |
|
638 | |
639 |
|
640 |
|
641 | activeOpacity?: number;
|
642 |
|
643 | |
644 |
|
645 |
|
646 | containerBorderRadius?: number;
|
647 |
|
648 | |
649 |
|
650 |
|
651 |
|
652 |
|
653 |
|
654 |
|
655 | disabled?: boolean | number[];
|
656 |
|
657 | |
658 |
|
659 |
|
660 | disabledStyle?: StyleProp<ViewStyle>;
|
661 |
|
662 | |
663 |
|
664 |
|
665 | disabledSelectedStyle?: StyleProp<ViewStyle>;
|
666 |
|
667 | |
668 |
|
669 |
|
670 | disabledTextStyle?: StyleProp<TextStyle>;
|
671 |
|
672 | |
673 |
|
674 |
|
675 | disabledSelectedTextStyle?: StyleProp<TextStyle>;
|
676 |
|
677 | |
678 |
|
679 |
|
680 |
|
681 |
|
682 | vertical?: boolean;
|
683 |
|
684 | |
685 |
|
686 |
|
687 | onPress(selectedIndex: number): void;
|
688 |
|
689 | |
690 |
|
691 |
|
692 |
|
693 | onHideUnderlay?(): void;
|
694 |
|
695 | |
696 |
|
697 |
|
698 | onShowUnderlay?(): void;
|
699 |
|
700 | |
701 |
|
702 |
|
703 | setOpacityTo?(value: number): void;
|
704 | }
|
705 |
|
706 | export class ButtonGroup extends React.Component<ButtonGroupProps> {}
|
707 |
|
708 | export interface CheckBoxProps {
|
709 | |
710 |
|
711 |
|
712 |
|
713 | iconType?: IconType;
|
714 |
|
715 | |
716 |
|
717 |
|
718 | Component?: React.ComponentClass;
|
719 |
|
720 | |
721 |
|
722 |
|
723 |
|
724 |
|
725 | checked: boolean;
|
726 |
|
727 | |
728 |
|
729 |
|
730 |
|
731 |
|
732 | iconRight?: boolean;
|
733 |
|
734 | |
735 |
|
736 |
|
737 |
|
738 |
|
739 | right?: boolean;
|
740 |
|
741 | |
742 |
|
743 |
|
744 |
|
745 |
|
746 | center?: boolean;
|
747 |
|
748 | |
749 |
|
750 |
|
751 | title?: string | React.ReactElement<{}>;
|
752 |
|
753 | |
754 |
|
755 |
|
756 | titleProps?: Partial<TextProperties>;
|
757 |
|
758 | |
759 |
|
760 |
|
761 | containerStyle?: StyleProp<ViewStyle>;
|
762 |
|
763 | |
764 |
|
765 |
|
766 | wrapperStyle?: StyleProp<ViewStyle>;
|
767 |
|
768 | |
769 |
|
770 |
|
771 | textStyle?: StyleProp<TextStyle>;
|
772 |
|
773 | |
774 |
|
775 |
|
776 |
|
777 |
|
778 | size?: number;
|
779 |
|
780 | |
781 |
|
782 |
|
783 | onLongPress?(): void;
|
784 |
|
785 | |
786 |
|
787 |
|
788 | onLongIconPress?(): void;
|
789 |
|
790 | |
791 |
|
792 |
|
793 | onPress?(): void;
|
794 |
|
795 | |
796 |
|
797 |
|
798 | onIconPress?(): void;
|
799 |
|
800 | |
801 |
|
802 |
|
803 |
|
804 |
|
805 | checkedIcon?: string | React.ReactElement<{}>;
|
806 |
|
807 | |
808 |
|
809 |
|
810 |
|
811 |
|
812 | uncheckedIcon?: string | React.ReactElement<{}>;
|
813 |
|
814 | |
815 |
|
816 |
|
817 |
|
818 |
|
819 | checkedColor?: string;
|
820 |
|
821 | |
822 |
|
823 |
|
824 |
|
825 | uncheckedColor?: string;
|
826 |
|
827 | |
828 |
|
829 |
|
830 | checkedTitle?: string;
|
831 |
|
832 | |
833 |
|
834 |
|
835 |
|
836 |
|
837 | fontFamily?: string;
|
838 | }
|
839 | export class CheckBox extends React.Component<CheckBoxProps, any> {}
|
840 |
|
841 | export interface DividerProps extends ViewProperties {}
|
842 |
|
843 | export class Divider extends React.Component<DividerProps> {}
|
844 |
|
845 | export interface InputProps extends TextInputProperties {
|
846 | |
847 |
|
848 |
|
849 | containerStyle?: StyleProp<ViewStyle>;
|
850 |
|
851 | |
852 |
|
853 |
|
854 | disabled?: boolean;
|
855 |
|
856 | |
857 |
|
858 |
|
859 | disabledInputStyle?: StyleProp<TextStyle>;
|
860 |
|
861 | |
862 |
|
863 |
|
864 | inputContainerStyle?: StyleProp<ViewStyle>;
|
865 |
|
866 | |
867 |
|
868 |
|
869 | leftIcon?: IconNode;
|
870 |
|
871 | |
872 |
|
873 |
|
874 | leftIconContainerStyle?: StyleProp<ViewStyle>;
|
875 |
|
876 | |
877 |
|
878 |
|
879 | rightIcon?: IconNode;
|
880 |
|
881 | |
882 |
|
883 |
|
884 | rightIconContainerStyle?: StyleProp<ViewStyle>;
|
885 |
|
886 | |
887 |
|
888 |
|
889 | InputComponent?: React.ComponentType<any>;
|
890 |
|
891 | |
892 |
|
893 |
|
894 | inputStyle?: StyleProp<TextStyle>;
|
895 |
|
896 | |
897 |
|
898 |
|
899 | errorStyle?: StyleProp<TextStyle>;
|
900 |
|
901 | |
902 |
|
903 |
|
904 | errorMessage?: string;
|
905 |
|
906 | |
907 |
|
908 |
|
909 | errorProps?: TextProps;
|
910 |
|
911 | |
912 |
|
913 |
|
914 | labelStyle?: StyleProp<TextStyle>;
|
915 |
|
916 | |
917 |
|
918 |
|
919 | label?: string | React.ReactElement<{}>;
|
920 |
|
921 | |
922 |
|
923 |
|
924 | labelProps?: TextProps;
|
925 |
|
926 | |
927 |
|
928 |
|
929 | renderErrorMessage?: boolean;
|
930 | }
|
931 |
|
932 | export class Input extends React.Component<InputProps> {
|
933 | |
934 |
|
935 |
|
936 |
|
937 |
|
938 | shake(): void;
|
939 |
|
940 | |
941 |
|
942 |
|
943 |
|
944 |
|
945 | focus(): void;
|
946 |
|
947 | |
948 |
|
949 |
|
950 |
|
951 |
|
952 | isFocused(): boolean;
|
953 |
|
954 | |
955 |
|
956 |
|
957 |
|
958 |
|
959 | blur(): void;
|
960 |
|
961 | |
962 |
|
963 |
|
964 |
|
965 |
|
966 | clear(): void;
|
967 |
|
968 | |
969 |
|
970 |
|
971 |
|
972 |
|
973 | setNativeProps(nativeProps: Partial<TextInputProps>): void;
|
974 | }
|
975 |
|
976 | export interface HeaderIcon extends IconObject {
|
977 | icon?: string;
|
978 | text?: string;
|
979 | color?: string;
|
980 | style?: StyleProp<TextStyle>;
|
981 | }
|
982 |
|
983 |
|
984 |
|
985 |
|
986 | export type HeaderSubComponent =
|
987 | | React.ReactElement<{}>
|
988 | | TextProps
|
989 | | HeaderIcon;
|
990 |
|
991 | export interface HeaderProps extends ViewProperties {
|
992 | |
993 |
|
994 |
|
995 |
|
996 |
|
997 |
|
998 | ViewComponent?: React.ComponentClass<any>;
|
999 |
|
1000 | |
1001 |
|
1002 |
|
1003 | linearGradientProps?: Object;
|
1004 |
|
1005 | |
1006 |
|
1007 |
|
1008 | statusBarProps?: StatusBarProperties;
|
1009 |
|
1010 | |
1011 |
|
1012 |
|
1013 |
|
1014 |
|
1015 | barStyle?: StatusBarStyle;
|
1016 |
|
1017 | |
1018 |
|
1019 |
|
1020 | leftComponent?: HeaderSubComponent;
|
1021 |
|
1022 | |
1023 |
|
1024 |
|
1025 | centerComponent?: HeaderSubComponent;
|
1026 |
|
1027 | |
1028 |
|
1029 |
|
1030 | rightComponent?: HeaderSubComponent;
|
1031 |
|
1032 | |
1033 |
|
1034 |
|
1035 | backgroundColor?: string;
|
1036 |
|
1037 | |
1038 |
|
1039 |
|
1040 | backgroundImage?: ImageSourcePropType;
|
1041 |
|
1042 | |
1043 |
|
1044 |
|
1045 | backgroundImageStyle?: ImageStyle;
|
1046 |
|
1047 | |
1048 |
|
1049 |
|
1050 |
|
1051 |
|
1052 | placement?: 'left' | 'center' | 'right';
|
1053 |
|
1054 | |
1055 |
|
1056 |
|
1057 | containerStyle?: StyleProp<ViewStyle>;
|
1058 |
|
1059 | |
1060 |
|
1061 |
|
1062 | centerContainerStyle?: StyleProp<ViewStyle>;
|
1063 |
|
1064 | |
1065 |
|
1066 |
|
1067 | leftContainerStyle?: StyleProp<ViewStyle>;
|
1068 |
|
1069 | |
1070 |
|
1071 |
|
1072 | rightContainerStyle?: StyleProp<ViewStyle>;
|
1073 | }
|
1074 |
|
1075 |
|
1076 |
|
1077 |
|
1078 | export class Header extends React.Component<HeaderProps, any> {}
|
1079 |
|
1080 | export interface IconProps extends IconButtonProps {
|
1081 | |
1082 |
|
1083 |
|
1084 |
|
1085 | type?: IconType;
|
1086 |
|
1087 | |
1088 |
|
1089 |
|
1090 | Component?: React.ComponentClass;
|
1091 |
|
1092 | |
1093 |
|
1094 |
|
1095 | iconProps?: VectorIconProps;
|
1096 |
|
1097 | |
1098 |
|
1099 |
|
1100 |
|
1101 |
|
1102 | reverse?: boolean;
|
1103 |
|
1104 | |
1105 |
|
1106 |
|
1107 |
|
1108 |
|
1109 | raised?: boolean;
|
1110 |
|
1111 | |
1112 |
|
1113 |
|
1114 | containerStyle?: StyleProp<ViewStyle>;
|
1115 |
|
1116 | |
1117 |
|
1118 |
|
1119 |
|
1120 |
|
1121 | reverseColor?: string;
|
1122 |
|
1123 | |
1124 |
|
1125 |
|
1126 | disabledStyle?: StyleProp<ViewStyle>;
|
1127 |
|
1128 | |
1129 |
|
1130 |
|
1131 |
|
1132 |
|
1133 | solid?: boolean;
|
1134 |
|
1135 | |
1136 |
|
1137 |
|
1138 |
|
1139 |
|
1140 | brand?: boolean;
|
1141 | }
|
1142 |
|
1143 |
|
1144 |
|
1145 |
|
1146 | export class Icon extends React.Component<IconProps> {}
|
1147 |
|
1148 | export interface ScaleProps extends TouchableWithoutFeedbackProps {
|
1149 | style?: StyleProp<ViewStyle>;
|
1150 | defaultNumber?: number;
|
1151 | activeScale?: number;
|
1152 | tension?: number;
|
1153 | friction?: number;
|
1154 | pressInTension?: number;
|
1155 | pressInFriction?: number;
|
1156 | pressOutTension?: number;
|
1157 | pressOutFriction?: number;
|
1158 | useNativeDriver?: boolean;
|
1159 | }
|
1160 |
|
1161 | export interface ListItemProps extends TouchableComponent {
|
1162 | containerStyle?: StyleProp<ViewStyle>;
|
1163 | contentContainerStyle?: StyleProp<ViewStyle>;
|
1164 | rightContentContainerStyle?: StyleProp<ViewStyle>;
|
1165 | chevron?: boolean | Partial<IconProps> | React.ReactElement<{}>;
|
1166 | checkmark?: boolean | Partial<IconProps> | React.ReactElement<{}>;
|
1167 | title?: string | React.ReactElement<{}>;
|
1168 | titleStyle?: StyleProp<TextStyle>;
|
1169 | titleProps?: TextProperties;
|
1170 | subtitle?: string | React.ReactElement<{}>;
|
1171 | subtitleStyle?: StyleProp<TextStyle>;
|
1172 | subtitleProps?: TextProperties;
|
1173 | rightTitle?: string | React.ReactElement<{}>;
|
1174 | rightTitleStyle?: StyleProp<TextStyle>;
|
1175 | rightTitleProps?: TextProperties;
|
1176 | rightSubtitle?: string | React.ReactElement<{}>;
|
1177 | rightSubtitleStyle?: StyleProp<TextStyle>;
|
1178 | rightSubtitleProps?: TextProperties;
|
1179 | leftIcon?: Partial<IconProps> | React.ReactElement<{}>;
|
1180 | rightIcon?: Partial<IconProps> | React.ReactElement<{}>;
|
1181 | leftAvatar?: Partial<AvatarProps> | React.ReactElement<{}>;
|
1182 | rightAvatar?: Partial<AvatarProps> | React.ReactElement<{}>;
|
1183 | leftElement?: React.ReactElement<{}>;
|
1184 | rightElement?: React.ReactElement<{}>;
|
1185 | switch?: SwitchProperties;
|
1186 | input?: InputProps;
|
1187 | buttonGroup?: ButtonGroupProps;
|
1188 | checkBox?: CheckBoxProps;
|
1189 | badge?: BadgeProps;
|
1190 | disabledStyle?: StyleProp<ViewStyle>;
|
1191 | topDivider?: boolean;
|
1192 | bottomDivider?: boolean;
|
1193 | scaleProps?: ScaleProps;
|
1194 | pad?: number;
|
1195 | Component?: React.ComponentType<{}>;
|
1196 | ViewComponent?: React.ComponentType<{}>;
|
1197 | }
|
1198 |
|
1199 |
|
1200 |
|
1201 |
|
1202 | export class ListItem extends React.Component<ListItemProps, any> {}
|
1203 |
|
1204 | export interface OverlayProps extends ModalProps {
|
1205 | |
1206 |
|
1207 |
|
1208 | children: React.ReactElement<any>;
|
1209 |
|
1210 | |
1211 |
|
1212 |
|
1213 | isVisible: boolean;
|
1214 |
|
1215 | |
1216 |
|
1217 |
|
1218 | backdropStyle?: StyleProp<ViewStyle>;
|
1219 |
|
1220 | |
1221 |
|
1222 |
|
1223 | overlayStyle?: StyleProp<ViewStyle>;
|
1224 |
|
1225 | |
1226 |
|
1227 |
|
1228 |
|
1229 |
|
1230 | fullScreen?: boolean;
|
1231 |
|
1232 | |
1233 |
|
1234 |
|
1235 | ModalComponent?: React.ComponentClass;
|
1236 |
|
1237 | |
1238 |
|
1239 |
|
1240 | onBackdropPress?(): void;
|
1241 | }
|
1242 |
|
1243 | export class Overlay extends React.Component<OverlayProps> {}
|
1244 |
|
1245 | export interface ButtonInformation {
|
1246 | title: string;
|
1247 | icon: string;
|
1248 | buttonStyle?: StyleProp<ViewStyle>;
|
1249 | titleStyle?: StyleProp<TextStyle>;
|
1250 | }
|
1251 |
|
1252 | export interface PricingCardProps {
|
1253 | |
1254 |
|
1255 |
|
1256 | title?: string;
|
1257 |
|
1258 | |
1259 |
|
1260 |
|
1261 | price: string;
|
1262 |
|
1263 | |
1264 |
|
1265 |
|
1266 | color?: string;
|
1267 |
|
1268 | |
1269 |
|
1270 |
|
1271 | info?: string[];
|
1272 |
|
1273 | |
1274 |
|
1275 |
|
1276 |
|
1277 | button: ButtonInformation;
|
1278 |
|
1279 | |
1280 |
|
1281 |
|
1282 | onButtonPress?(): void;
|
1283 |
|
1284 | |
1285 |
|
1286 |
|
1287 | containerStyle?: StyleProp<ViewStyle>;
|
1288 |
|
1289 | |
1290 |
|
1291 |
|
1292 | wrapperStyle?: StyleProp<ViewStyle>;
|
1293 |
|
1294 | |
1295 |
|
1296 |
|
1297 | titleStyle?: StyleProp<TextStyle>;
|
1298 |
|
1299 | |
1300 |
|
1301 |
|
1302 | pricingStyle?: StyleProp<TextStyle>;
|
1303 |
|
1304 | |
1305 |
|
1306 |
|
1307 | infoStyle?: StyleProp<TextStyle>;
|
1308 | }
|
1309 |
|
1310 |
|
1311 |
|
1312 |
|
1313 | export class PricingCard extends React.Component<PricingCardProps, any> {}
|
1314 |
|
1315 |
|
1316 |
|
1317 |
|
1318 | export * from 'react-native-ratings';
|
1319 |
|
1320 | export type IconNode = boolean | React.ReactElement<{}> | Partial<IconProps>;
|
1321 |
|
1322 | export interface SearchBarWrapper {
|
1323 | |
1324 |
|
1325 |
|
1326 |
|
1327 |
|
1328 | platform?: 'default' | 'ios' | 'android';
|
1329 | }
|
1330 |
|
1331 | export interface SearchBarBase extends InputProps {
|
1332 | |
1333 |
|
1334 |
|
1335 | containerStyle?: StyleProp<ViewStyle>;
|
1336 |
|
1337 | |
1338 |
|
1339 |
|
1340 | inputContainerStyle?: StyleProp<ViewStyle>;
|
1341 |
|
1342 | |
1343 |
|
1344 |
|
1345 | clearIcon?: IconNode;
|
1346 |
|
1347 | |
1348 |
|
1349 |
|
1350 | searchIcon?: IconNode;
|
1351 |
|
1352 | |
1353 |
|
1354 |
|
1355 | inputStyle?: StyleProp<TextStyle>;
|
1356 |
|
1357 | |
1358 |
|
1359 |
|
1360 | loadingProps?: ActivityIndicatorProperties;
|
1361 |
|
1362 | |
1363 |
|
1364 |
|
1365 |
|
1366 |
|
1367 | showLoading?: boolean;
|
1368 |
|
1369 | |
1370 |
|
1371 |
|
1372 | leftIconContainerStyle?: StyleProp<ViewStyle>;
|
1373 |
|
1374 | |
1375 |
|
1376 |
|
1377 | rightIconContainerStyle?: StyleProp<ViewStyle>;
|
1378 |
|
1379 | |
1380 |
|
1381 |
|
1382 | onClear?(): void;
|
1383 |
|
1384 | |
1385 |
|
1386 |
|
1387 | onFocus?(): void;
|
1388 |
|
1389 | |
1390 |
|
1391 |
|
1392 | onBlur?(): void;
|
1393 |
|
1394 | |
1395 |
|
1396 |
|
1397 | onChangeText?(text: string): void;
|
1398 | }
|
1399 |
|
1400 | export interface TooltipProps {
|
1401 | |
1402 |
|
1403 |
|
1404 | backgroundColor?: string;
|
1405 |
|
1406 | |
1407 |
|
1408 |
|
1409 | highlightColor?: string;
|
1410 |
|
1411 | |
1412 |
|
1413 |
|
1414 | ModalComponent?: React.ComponentClass;
|
1415 |
|
1416 | |
1417 |
|
1418 |
|
1419 | onClose?(): void;
|
1420 |
|
1421 | |
1422 |
|
1423 |
|
1424 | onOpen?(): void;
|
1425 |
|
1426 | |
1427 |
|
1428 |
|
1429 | pointerColor?: string;
|
1430 |
|
1431 | |
1432 |
|
1433 |
|
1434 | toggleOnPress?: boolean;
|
1435 |
|
1436 | |
1437 |
|
1438 |
|
1439 | toggleAction?: string;
|
1440 |
|
1441 | |
1442 |
|
1443 |
|
1444 | popover?: React.ReactElement<{}>;
|
1445 |
|
1446 | |
1447 |
|
1448 |
|
1449 | containerStyle?: StyleProp<ViewStyle>;
|
1450 |
|
1451 | |
1452 |
|
1453 |
|
1454 |
|
1455 | height?: number;
|
1456 |
|
1457 | |
1458 |
|
1459 |
|
1460 |
|
1461 | width?: number;
|
1462 |
|
1463 | |
1464 |
|
1465 |
|
1466 |
|
1467 |
|
1468 | withOverlay?: boolean;
|
1469 |
|
1470 | |
1471 |
|
1472 |
|
1473 |
|
1474 |
|
1475 | overlayColor?: string;
|
1476 |
|
1477 | |
1478 |
|
1479 |
|
1480 | withPointer?: boolean;
|
1481 |
|
1482 | |
1483 |
|
1484 |
|
1485 | skipAndroidStatusBar?: boolean;
|
1486 |
|
1487 | |
1488 |
|
1489 |
|
1490 | closeOnlyOnBackdropPress?: boolean;
|
1491 | }
|
1492 |
|
1493 | export class Tooltip extends React.Component<TooltipProps, any> {
|
1494 | |
1495 |
|
1496 |
|
1497 | toggleTooltip(): void;
|
1498 | }
|
1499 |
|
1500 | export interface SearchBarDefault extends SearchBarBase {
|
1501 | |
1502 |
|
1503 |
|
1504 |
|
1505 |
|
1506 | lightTheme?: boolean;
|
1507 |
|
1508 | |
1509 |
|
1510 |
|
1511 |
|
1512 |
|
1513 | round?: boolean;
|
1514 | }
|
1515 |
|
1516 | export interface SearchBarPlatform extends SearchBarBase {
|
1517 | |
1518 |
|
1519 |
|
1520 | onCancel?(): void;
|
1521 | }
|
1522 |
|
1523 | export interface SearchBarAndroid extends SearchBarPlatform {
|
1524 | |
1525 |
|
1526 |
|
1527 | cancelIcon?: IconNode;
|
1528 | }
|
1529 |
|
1530 | export interface SearchBarIOS extends SearchBarPlatform {
|
1531 | |
1532 |
|
1533 |
|
1534 | cancelButtonProps?: Partial<TouchableOpacityProps> & {
|
1535 | buttonStyle?: StyleProp<ViewStyle>;
|
1536 | buttonTextStyle?: StyleProp<TextStyle>;
|
1537 | color?: string;
|
1538 | buttonDisabledStyle?: StyleProp<ViewStyle>;
|
1539 | buttonDisabledTextStyle?: StyleProp<ViewStyle>;
|
1540 | };
|
1541 |
|
1542 | |
1543 |
|
1544 |
|
1545 | cancelButtonTitle?: string;
|
1546 |
|
1547 | |
1548 |
|
1549 |
|
1550 | showCancel?: boolean;
|
1551 | }
|
1552 |
|
1553 | export type SearchBarProps = SearchBarWrapper &
|
1554 | SearchBarBase &
|
1555 | SearchBarPlatform &
|
1556 | SearchBarDefault &
|
1557 | SearchBarIOS &
|
1558 | SearchBarAndroid;
|
1559 |
|
1560 |
|
1561 |
|
1562 |
|
1563 | export class SearchBar extends React.Component<SearchBarProps, any> {
|
1564 | |
1565 |
|
1566 |
|
1567 | input: TextInput;
|
1568 |
|
1569 | |
1570 |
|
1571 |
|
1572 | focus(): void;
|
1573 |
|
1574 | |
1575 |
|
1576 |
|
1577 | blur(): void;
|
1578 |
|
1579 | |
1580 |
|
1581 |
|
1582 | clear(): void;
|
1583 |
|
1584 | |
1585 |
|
1586 |
|
1587 |
|
1588 |
|
1589 | cancel?(): void;
|
1590 | }
|
1591 |
|
1592 | export interface SliderProps {
|
1593 | |
1594 |
|
1595 |
|
1596 |
|
1597 |
|
1598 | value?: number;
|
1599 |
|
1600 | |
1601 |
|
1602 |
|
1603 |
|
1604 |
|
1605 | orientation?: 'horizontal' | 'vertical';
|
1606 |
|
1607 | |
1608 |
|
1609 |
|
1610 |
|
1611 |
|
1612 | disabled?: boolean;
|
1613 |
|
1614 | |
1615 |
|
1616 |
|
1617 |
|
1618 |
|
1619 | minimumValue?: number;
|
1620 |
|
1621 | |
1622 |
|
1623 |
|
1624 |
|
1625 |
|
1626 | maximumValue?: number;
|
1627 |
|
1628 | |
1629 |
|
1630 |
|
1631 |
|
1632 |
|
1633 | step?: number;
|
1634 |
|
1635 | |
1636 |
|
1637 |
|
1638 |
|
1639 |
|
1640 | minimumTrackTintColor?: string;
|
1641 |
|
1642 | |
1643 |
|
1644 |
|
1645 |
|
1646 |
|
1647 | maximumTrackTintColor?: string;
|
1648 |
|
1649 | |
1650 |
|
1651 |
|
1652 |
|
1653 |
|
1654 | thumbTintColor?: string;
|
1655 |
|
1656 | |
1657 |
|
1658 |
|
1659 |
|
1660 |
|
1661 |
|
1662 | thumbTouchSize?: {
|
1663 | width?: number;
|
1664 | height?: number;
|
1665 | };
|
1666 |
|
1667 | |
1668 |
|
1669 |
|
1670 | onValueChange?(value: number): void;
|
1671 |
|
1672 | |
1673 |
|
1674 |
|
1675 | onSlidingStart?(value: number): void;
|
1676 |
|
1677 | |
1678 |
|
1679 |
|
1680 | onSlidingComplete?(value: number): void;
|
1681 |
|
1682 | |
1683 |
|
1684 |
|
1685 | style?: StyleProp<ViewStyle>;
|
1686 |
|
1687 | |
1688 |
|
1689 |
|
1690 | trackStyle?: StyleProp<ViewStyle>;
|
1691 |
|
1692 | |
1693 |
|
1694 |
|
1695 | allowTouchTrack?: boolean;
|
1696 |
|
1697 | |
1698 |
|
1699 |
|
1700 | thumbStyle?: StyleProp<ViewStyle>;
|
1701 |
|
1702 | |
1703 |
|
1704 |
|
1705 | thumbProps?: any;
|
1706 |
|
1707 | |
1708 |
|
1709 |
|
1710 |
|
1711 |
|
1712 | debugTouchArea?: boolean;
|
1713 |
|
1714 | |
1715 |
|
1716 |
|
1717 |
|
1718 |
|
1719 | animateTransitions?: boolean;
|
1720 |
|
1721 | |
1722 |
|
1723 |
|
1724 |
|
1725 |
|
1726 | animationType?: 'spring' | 'timing';
|
1727 |
|
1728 | |
1729 |
|
1730 |
|
1731 |
|
1732 |
|
1733 | animationConfig?:
|
1734 | | Animated.TimingAnimationConfig
|
1735 | | Animated.SpringAnimationConfig;
|
1736 | }
|
1737 |
|
1738 |
|
1739 |
|
1740 |
|
1741 | export class Slider extends React.Component<SliderProps, any> {}
|
1742 |
|
1743 | export type SocialMediaType =
|
1744 | | 'facebook'
|
1745 | | 'twitter'
|
1746 | | 'google-plus-official'
|
1747 | | 'google'
|
1748 | | 'pinterest'
|
1749 | | 'linkedin'
|
1750 | | 'youtube'
|
1751 | | 'vimeo'
|
1752 | | 'tumblr'
|
1753 | | 'instagram'
|
1754 | | 'quora'
|
1755 | | 'flickr'
|
1756 | | 'foursquare'
|
1757 | | 'wordpress'
|
1758 | | 'stumbleupon'
|
1759 | | 'github'
|
1760 | | 'github-alt'
|
1761 | | 'twitch'
|
1762 | | 'medium'
|
1763 | | 'soundcloud'
|
1764 | | 'gitlab'
|
1765 | | 'angellist'
|
1766 | | 'codepen'
|
1767 | | 'weibo'
|
1768 | | 'vk';
|
1769 |
|
1770 | export interface SocialIconProps {
|
1771 | |
1772 |
|
1773 |
|
1774 | title?: string;
|
1775 |
|
1776 | |
1777 |
|
1778 |
|
1779 | type: SocialMediaType;
|
1780 |
|
1781 | |
1782 |
|
1783 |
|
1784 |
|
1785 |
|
1786 | raised?: boolean;
|
1787 |
|
1788 | |
1789 |
|
1790 |
|
1791 |
|
1792 |
|
1793 | button?: boolean;
|
1794 |
|
1795 | |
1796 |
|
1797 |
|
1798 | onPress?(): void;
|
1799 |
|
1800 | |
1801 |
|
1802 |
|
1803 | onLongPress?(): void;
|
1804 |
|
1805 | |
1806 |
|
1807 |
|
1808 |
|
1809 |
|
1810 | light?: boolean;
|
1811 |
|
1812 | |
1813 |
|
1814 |
|
1815 | iconStyle?: StyleProp<ViewStyle>;
|
1816 |
|
1817 | |
1818 |
|
1819 |
|
1820 | style?: StyleProp<ViewStyle>;
|
1821 |
|
1822 | |
1823 |
|
1824 |
|
1825 | iconColor?: string;
|
1826 |
|
1827 | |
1828 |
|
1829 |
|
1830 |
|
1831 |
|
1832 | iconSize?: number;
|
1833 |
|
1834 | |
1835 |
|
1836 |
|
1837 |
|
1838 |
|
1839 | Component?: React.ComponentClass;
|
1840 |
|
1841 | |
1842 |
|
1843 |
|
1844 |
|
1845 |
|
1846 | fontFamily?: string;
|
1847 |
|
1848 | |
1849 |
|
1850 |
|
1851 |
|
1852 |
|
1853 | fontWeight?: string;
|
1854 |
|
1855 | |
1856 |
|
1857 |
|
1858 | fontStyle?: StyleProp<TextStyle>;
|
1859 |
|
1860 | |
1861 |
|
1862 |
|
1863 |
|
1864 |
|
1865 | disabled?: boolean;
|
1866 |
|
1867 | |
1868 |
|
1869 |
|
1870 |
|
1871 |
|
1872 | loading?: boolean;
|
1873 |
|
1874 | |
1875 |
|
1876 |
|
1877 |
|
1878 |
|
1879 | underlayColor?: string;
|
1880 | }
|
1881 |
|
1882 |
|
1883 |
|
1884 |
|
1885 | export class SocialIcon extends React.Component<SocialIconProps, any> {}
|
1886 |
|
1887 | export interface TileProps {
|
1888 | |
1889 |
|
1890 |
|
1891 | icon?: IconObject;
|
1892 |
|
1893 | |
1894 |
|
1895 |
|
1896 | iconContainerStyle?: StyleProp<ViewStyle>;
|
1897 |
|
1898 | |
1899 |
|
1900 |
|
1901 | title?: string;
|
1902 |
|
1903 | |
1904 |
|
1905 |
|
1906 | titleStyle?: StyleProp<TextStyle>;
|
1907 |
|
1908 | |
1909 |
|
1910 |
|
1911 | caption?: string;
|
1912 |
|
1913 | |
1914 |
|
1915 |
|
1916 | captionStyle?: StyleProp<TextStyle>;
|
1917 |
|
1918 | |
1919 |
|
1920 |
|
1921 | featured?: boolean;
|
1922 |
|
1923 | |
1924 |
|
1925 |
|
1926 | containerStyle?: StyleProp<ViewStyle>;
|
1927 |
|
1928 | |
1929 |
|
1930 |
|
1931 | imageSrc: ImageURISource | string | number;
|
1932 |
|
1933 | |
1934 |
|
1935 |
|
1936 | imageContainerStyle?: StyleProp<ViewStyle>;
|
1937 | |
1938 |
|
1939 |
|
1940 | overlayContainerStyle?: StyleProp<ViewStyle>;
|
1941 | |
1942 |
|
1943 |
|
1944 | onPress?(): void;
|
1945 |
|
1946 | |
1947 |
|
1948 |
|
1949 |
|
1950 |
|
1951 | activeOpacity?: number;
|
1952 |
|
1953 | |
1954 |
|
1955 |
|
1956 | contentContainerStyle?: StyleProp<ViewStyle>;
|
1957 |
|
1958 | |
1959 |
|
1960 |
|
1961 |
|
1962 |
|
1963 | width?: number;
|
1964 |
|
1965 | |
1966 |
|
1967 |
|
1968 |
|
1969 |
|
1970 | height?: number;
|
1971 |
|
1972 | |
1973 |
|
1974 |
|
1975 |
|
1976 | ImageComponent?: React.ComponentClass;
|
1977 |
|
1978 | |
1979 |
|
1980 |
|
1981 | imageProps?: Partial<ImageProps>;
|
1982 | }
|
1983 |
|
1984 |
|
1985 |
|
1986 |
|
1987 | export class Tile extends React.Component<TileProps> {}
|
1988 |
|
1989 | export interface ImageProps extends RNImageProps {
|
1990 | |
1991 |
|
1992 |
|
1993 |
|
1994 |
|
1995 | Component?: React.ComponentClass;
|
1996 |
|
1997 | |
1998 |
|
1999 |
|
2000 | onPress?(): void;
|
2001 |
|
2002 | |
2003 |
|
2004 |
|
2005 | onLongPress?(): void;
|
2006 |
|
2007 | |
2008 |
|
2009 |
|
2010 |
|
2011 |
|
2012 | ImageComponent?: React.ComponentType<any>;
|
2013 |
|
2014 | |
2015 |
|
2016 |
|
2017 | PlaceholderContent?: React.ReactElement<any>;
|
2018 |
|
2019 | |
2020 |
|
2021 |
|
2022 | containerStyle?: StyleProp<ViewStyle>;
|
2023 |
|
2024 | |
2025 |
|
2026 |
|
2027 | placeholderStyle?: StyleProp<ViewStyle>;
|
2028 |
|
2029 | |
2030 |
|
2031 |
|
2032 |
|
2033 |
|
2034 | transition?: boolean;
|
2035 | }
|
2036 |
|
2037 |
|
2038 |
|
2039 |
|
2040 | export class Image extends React.Component<ImageProps> {}
|
2041 |
|
2042 |
|
2043 |
|
2044 |
|
2045 |
|
2046 | export interface Colors {
|
2047 | readonly primary: string;
|
2048 | readonly secondary: string;
|
2049 | readonly grey0: string;
|
2050 | readonly grey1: string;
|
2051 | readonly grey2: string;
|
2052 | readonly grey3: string;
|
2053 | readonly grey4: string;
|
2054 | readonly grey5: string;
|
2055 | readonly greyOutline: string;
|
2056 | readonly searchBg: string;
|
2057 | readonly success: string;
|
2058 | readonly warning: string;
|
2059 | readonly error: string;
|
2060 | readonly disabled: string;
|
2061 | readonly divider: string;
|
2062 | readonly platform: {
|
2063 | ios: {
|
2064 | primary: string;
|
2065 | secondary: string;
|
2066 | success: string;
|
2067 | error: string;
|
2068 | warning: string;
|
2069 | };
|
2070 | android: {
|
2071 | primary: string;
|
2072 | secondary: string;
|
2073 | success: string;
|
2074 | error: string;
|
2075 | warning: string;
|
2076 | };
|
2077 | };
|
2078 | }
|
2079 |
|
2080 | export const colors: Colors;
|
2081 |
|
2082 |
|
2083 |
|
2084 |
|
2085 |
|
2086 |
|
2087 | export function getIconType(type: IconType): any;
|
2088 |
|
2089 |
|
2090 |
|
2091 |
|
2092 | export function normalize(size: number): number;
|
2093 |
|
2094 |
|
2095 |
|
2096 |
|
2097 | export function registerCustomIconType(id: string, font: any): void;
|
2098 |
|
2099 | type RecursivePartial<T> = { [P in keyof T]?: RecursivePartial<T[P]> };
|
2100 |
|
2101 | export interface FullTheme {
|
2102 | Avatar: Partial<AvatarProps>;
|
2103 | Accessory: Partial<IconProps> & Partial<ImageProps>;
|
2104 | Badge: Partial<BadgeProps>;
|
2105 | BottomSheet: Partial<BottomSheetProps>;
|
2106 | Button: Partial<ButtonProps>;
|
2107 | ButtonGroup: Partial<ButtonGroupProps>;
|
2108 | Card: Partial<CardProps>;
|
2109 | CheckBox: Partial<CheckBoxProps>;
|
2110 | Divider: Partial<DividerProps>;
|
2111 | Header: Partial<HeaderProps>;
|
2112 | Icon: Partial<IconProps>;
|
2113 | Image: Partial<ImageProps>;
|
2114 | Input: Partial<InputProps>;
|
2115 | ListItem: Partial<ListItemProps>;
|
2116 | Overlay: Partial<OverlayProps>;
|
2117 | PricingCard: Partial<PricingCardProps>;
|
2118 | Rating: Partial<RatingProps>;
|
2119 | AirbnbRating: Partial<AirbnbRatingProps>;
|
2120 | SearchBar: Partial<SearchBarProps>;
|
2121 | Slider: Partial<SliderProps>;
|
2122 | SocialIcon: Partial<SocialIconProps>;
|
2123 | Text: Partial<TextProps>;
|
2124 | Tile: Partial<TileProps>;
|
2125 | Tooltip: Partial<TooltipProps>;
|
2126 | colors: RecursivePartial<Colors>;
|
2127 | }
|
2128 |
|
2129 | export type Theme<T = {}> = Partial<FullTheme> & T;
|
2130 |
|
2131 | export type UpdateTheme = (updates: RecursivePartial<FullTheme>) => void;
|
2132 |
|
2133 | export type ReplaceTheme = (updates: RecursivePartial<FullTheme>) => void;
|
2134 |
|
2135 | export interface ThemeProps<T> {
|
2136 | theme: Theme<T>;
|
2137 | updateTheme: UpdateTheme;
|
2138 | replaceTheme: ReplaceTheme;
|
2139 | }
|
2140 |
|
2141 |
|
2142 |
|
2143 |
|
2144 | export interface ThemeProviderProps<T> {
|
2145 | theme?: Theme<T>;
|
2146 | children: React.ReactNode;
|
2147 | useDark?: boolean;
|
2148 | }
|
2149 |
|
2150 | export class ThemeProvider<T> extends React.Component<ThemeProviderProps<T>> {
|
2151 | updateTheme: UpdateTheme;
|
2152 | replaceTheme: ReplaceTheme;
|
2153 |
|
2154 | getTheme(): Theme<T>;
|
2155 | }
|
2156 |
|
2157 | export interface ThemeConsumerProps<T> {
|
2158 | children(props: ThemeProps<T>): React.ReactNode;
|
2159 | }
|
2160 |
|
2161 | export class ThemeConsumer<T> extends React.Component<ThemeConsumerProps<T>> {}
|
2162 |
|
2163 | export const ThemeContext: React.Context<ThemeProps<{}>>;
|
2164 |
|
2165 | export function withTheme<P = {}, T = {}>(
|
2166 | component: React.ComponentType<P & ThemeProps<T>>,
|
2167 | themeKey?: string
|
2168 | ): React.ComponentClass<Omit<P, keyof ThemeProps<T>>>;
|