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