Skip to content

Commit f81a756

Browse files
committed
Fix import issue in Button component
1 parent 1de3ff3 commit f81a756

File tree

2 files changed

+46
-13
lines changed

2 files changed

+46
-13
lines changed

generatedTypes/components/button/index.d.ts

Lines changed: 44 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,18 @@ export declare type ButtonPropTypes = TouchableOpacityProps & TypographyModifier
3535
* Should the icon be right to the label
3636
*/
3737
iconOnRight?: boolean;
38+
/**
39+
* whether the icon should flip horizontally on RTL locals
40+
*/
41+
supportRTL?: boolean;
3842
/**
3943
* Color of the button background
4044
*/
4145
backgroundColor?: string;
46+
/**
47+
* Color of the disabled button background
48+
*/
49+
disabledBackgroundColor?: string;
4250
/**
4351
* Size of the button [large, medium, small, xSmall]
4452
*/
@@ -336,9 +344,7 @@ declare const _default: React.ComponentClass<(Pick<import("react-native").Toucha
336344
trailing: boolean;
337345
} | undefined;
338346
activeBackgroundColor?: string | undefined;
339-
useNative?: boolean | undefined; /**
340-
* Text to show inside the button
341-
*/
347+
useNative?: boolean | undefined;
342348
customValue?: any;
343349
ref?: any;
344350
style?: false | import("react-native").ViewStyle | import("react-native").RegisteredStyle<import("react-native").ViewStyle> | import("react-native").RecursiveArray<false | import("react-native").ViewStyle | import("react-native").RegisteredStyle<import("react-native").ViewStyle> | null | undefined> | import("react-native").Animated.AnimatedProps<import("react-native").ViewStyle> | import("react-native").Animated.AnimatedProps<import("react-native").RegisteredStyle<import("react-native").ViewStyle>> | import("react-native").Animated.AnimatedProps<import("react-native").RecursiveArray<false | import("react-native").ViewStyle | import("react-native").RegisteredStyle<import("react-native").ViewStyle> | null | undefined>> | null | undefined;
@@ -363,10 +369,18 @@ declare const _default: React.ComponentClass<(Pick<import("react-native").Toucha
363369
* Should the icon be right to the label
364370
*/
365371
iconOnRight?: boolean | undefined;
372+
/**
373+
* whether the icon should flip horizontally on RTL locals
374+
*/
375+
supportRTL?: boolean | undefined;
366376
/**
367377
* Color of the button background
368378
*/
369379
backgroundColor?: string | undefined;
380+
/**
381+
* Color of the disabled button background
382+
*/
383+
disabledBackgroundColor?: string | undefined;
370384
/**
371385
* Size of the button [large, medium, small, xSmall]
372386
*/
@@ -487,9 +501,7 @@ declare const _default: React.ComponentClass<(Pick<import("react-native").Toucha
487501
trailing: boolean;
488502
} | undefined;
489503
activeBackgroundColor?: string | undefined;
490-
useNative?: boolean | undefined; /**
491-
* Text to show inside the button
492-
*/
504+
useNative?: boolean | undefined;
493505
customValue?: any;
494506
ref?: any;
495507
style?: false | import("react-native").ViewStyle | import("react-native").RegisteredStyle<import("react-native").ViewStyle> | import("react-native").RecursiveArray<false | import("react-native").ViewStyle | import("react-native").RegisteredStyle<import("react-native").ViewStyle> | null | undefined> | import("react-native").Animated.AnimatedProps<import("react-native").ViewStyle> | import("react-native").Animated.AnimatedProps<import("react-native").RegisteredStyle<import("react-native").ViewStyle>> | import("react-native").Animated.AnimatedProps<import("react-native").RecursiveArray<false | import("react-native").ViewStyle | import("react-native").RegisteredStyle<import("react-native").ViewStyle> | null | undefined>> | null | undefined;
@@ -514,10 +526,18 @@ declare const _default: React.ComponentClass<(Pick<import("react-native").Toucha
514526
* Should the icon be right to the label
515527
*/
516528
iconOnRight?: boolean | undefined;
529+
/**
530+
* whether the icon should flip horizontally on RTL locals
531+
*/
532+
supportRTL?: boolean | undefined;
517533
/**
518534
* Color of the button background
519535
*/
520536
backgroundColor?: string | undefined;
537+
/**
538+
* Color of the disabled button background
539+
*/
540+
disabledBackgroundColor?: string | undefined;
521541
/**
522542
* Size of the button [large, medium, small, xSmall]
523543
*/
@@ -638,9 +658,7 @@ declare const _default: React.ComponentClass<(Pick<import("react-native").Toucha
638658
trailing: boolean;
639659
} | undefined;
640660
activeBackgroundColor?: string | undefined;
641-
useNative?: boolean | undefined; /**
642-
* Text to show inside the button
643-
*/
661+
useNative?: boolean | undefined;
644662
customValue?: any;
645663
ref?: any;
646664
style?: false | import("react-native").ViewStyle | import("react-native").RegisteredStyle<import("react-native").ViewStyle> | import("react-native").RecursiveArray<false | import("react-native").ViewStyle | import("react-native").RegisteredStyle<import("react-native").ViewStyle> | null | undefined> | import("react-native").Animated.AnimatedProps<import("react-native").ViewStyle> | import("react-native").Animated.AnimatedProps<import("react-native").RegisteredStyle<import("react-native").ViewStyle>> | import("react-native").Animated.AnimatedProps<import("react-native").RecursiveArray<false | import("react-native").ViewStyle | import("react-native").RegisteredStyle<import("react-native").ViewStyle> | null | undefined>> | null | undefined;
@@ -665,10 +683,18 @@ declare const _default: React.ComponentClass<(Pick<import("react-native").Toucha
665683
* Should the icon be right to the label
666684
*/
667685
iconOnRight?: boolean | undefined;
686+
/**
687+
* whether the icon should flip horizontally on RTL locals
688+
*/
689+
supportRTL?: boolean | undefined;
668690
/**
669691
* Color of the button background
670692
*/
671693
backgroundColor?: string | undefined;
694+
/**
695+
* Color of the disabled button background
696+
*/
697+
disabledBackgroundColor?: string | undefined;
672698
/**
673699
* Size of the button [large, medium, small, xSmall]
674700
*/
@@ -789,9 +815,7 @@ declare const _default: React.ComponentClass<(Pick<import("react-native").Toucha
789815
trailing: boolean;
790816
} | undefined;
791817
activeBackgroundColor?: string | undefined;
792-
useNative?: boolean | undefined; /**
793-
* Text to show inside the button
794-
*/
818+
useNative?: boolean | undefined;
795819
customValue?: any;
796820
ref?: any;
797821
style?: false | import("react-native").ViewStyle | import("react-native").RegisteredStyle<import("react-native").ViewStyle> | import("react-native").RecursiveArray<false | import("react-native").ViewStyle | import("react-native").RegisteredStyle<import("react-native").ViewStyle> | null | undefined> | import("react-native").Animated.AnimatedProps<import("react-native").ViewStyle> | import("react-native").Animated.AnimatedProps<import("react-native").RegisteredStyle<import("react-native").ViewStyle>> | import("react-native").Animated.AnimatedProps<import("react-native").RecursiveArray<false | import("react-native").ViewStyle | import("react-native").RegisteredStyle<import("react-native").ViewStyle> | null | undefined>> | null | undefined;
@@ -816,10 +840,18 @@ declare const _default: React.ComponentClass<(Pick<import("react-native").Toucha
816840
* Should the icon be right to the label
817841
*/
818842
iconOnRight?: boolean | undefined;
843+
/**
844+
* whether the icon should flip horizontally on RTL locals
845+
*/
846+
supportRTL?: boolean | undefined;
819847
/**
820848
* Color of the button background
821849
*/
822850
backgroundColor?: string | undefined;
851+
/**
852+
* Color of the disabled button background
853+
*/
854+
disabledBackgroundColor?: string | undefined;
823855
/**
824856
* Size of the button [large, medium, small, xSmall]
825857
*/

src/components/button/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import React, {PureComponent} from 'react';
22
import {Platform, StyleSheet, LayoutAnimation, LayoutChangeEvent, ImageStyle, TextStyle, StyleProp} from 'react-native';
3-
import {Image} from 'react-native-ui-lib';
43
import _ from 'lodash';
54
import {
65
asBaseComponent,
@@ -18,6 +17,8 @@ import {Colors, Typography, ThemeManager, BorderRadiuses} from '../../style';
1817
import {extractColorValue, extractTypographyValue} from '../../commons/modifiers';
1918
import TouchableOpacity, {TouchableOpacityProps} from '../touchableOpacity';
2019
import Text, {TextPropTypes} from '../text';
20+
import Image from '../image';
21+
2122

2223
export enum ButtonSize {
2324
xSmall = 'xSmall',

0 commit comments

Comments
 (0)