@codeleap/mobile 3.20.0 → 3.20.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -93,17 +93,16 @@ export const EmptyPlaceholder:React.FC<EmptyPlaceholderProps> = (props: EmptyPla
|
|
|
93
93
|
if (icon) {
|
|
94
94
|
_image = <Icon name={icon} style={componentStyles.icon}/>
|
|
95
95
|
} else if (image) {
|
|
96
|
-
_image = <Image source={image} style={[
|
|
97
|
-
componentStyles.image,
|
|
98
|
-
|
|
99
|
-
]}/>
|
|
96
|
+
_image = <Image source={image} style={[componentStyles.image]}/>
|
|
100
97
|
}
|
|
101
98
|
|
|
102
99
|
return (
|
|
103
100
|
<View style={componentStyles.wrapper}>
|
|
104
|
-
|
|
105
|
-
{
|
|
106
|
-
|
|
101
|
+
{React.isValidElement(_image) ? (
|
|
102
|
+
<View style={componentStyles.imageWrapper}>
|
|
103
|
+
{_image}
|
|
104
|
+
</View>
|
|
105
|
+
) : null}
|
|
107
106
|
|
|
108
107
|
{React.isValidElement(emptyText) ? emptyText : <Text text={emptyText} style={componentStyles.title}/> }
|
|
109
108
|
{React.isValidElement(description) ? description : <Text text={description} style={componentStyles.description}/> }
|
|
@@ -75,6 +75,7 @@ const _Touchable = forwardRef<
|
|
|
75
75
|
analyticsName,
|
|
76
76
|
analyticsData = {},
|
|
77
77
|
dismissKeyboard,
|
|
78
|
+
disabled,
|
|
78
79
|
...props
|
|
79
80
|
} = {
|
|
80
81
|
...defaultProps,
|
|
@@ -142,7 +143,7 @@ const _Touchable = forwardRef<
|
|
|
142
143
|
|
|
143
144
|
}
|
|
144
145
|
|
|
145
|
-
const _styles = StyleSheet.flatten([variantStyles.wrapper, style])
|
|
146
|
+
const _styles = StyleSheet.flatten([variantStyles.wrapper, disabled && variantStyles['wrapper:disabled'], style])
|
|
146
147
|
|
|
147
148
|
const disableFeedback = !onPress || noFeedback
|
|
148
149
|
|
|
@@ -2,7 +2,7 @@ import { createDefaultVariantFactory, includePresets } from '@codeleap/common'
|
|
|
2
2
|
import { StylesOf } from '../../types'
|
|
3
3
|
import { TouchableFeedbackConfig } from '../../utils'
|
|
4
4
|
|
|
5
|
-
export type TouchableComposition = 'wrapper' | 'feedback' | 'pressable'
|
|
5
|
+
export type TouchableComposition = 'wrapper' | 'wrapper:disabled' | 'feedback' | 'pressable'
|
|
6
6
|
|
|
7
7
|
export type TouchableStylesGen<TCSS = any> = StylesOf<Exclude<TouchableComposition, 'feedback'>> & {
|
|
8
8
|
feedback?: TouchableFeedbackConfig
|