@fto-consult/expo-ui 2.36.1 → 2.36.2

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fto-consult/expo-ui",
3
- "version": "2.36.1",
3
+ "version": "2.36.2",
4
4
  "description": "Bibliothèque de composants UI Expo,react-native",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -55,6 +55,7 @@ const AvatarImage = React.forwardRef(({
55
55
  borderRadius,
56
56
  },
57
57
  flattenedStyle,
58
+ !isRounded && {borderRadius:0},
58
59
  ]}
59
60
  {...rest}
60
61
  >
@@ -19,9 +19,13 @@ const defaultSize = 40;
19
19
  */
20
20
  const AvatarComponent = React.forwardRef((props,ref)=>{
21
21
  let Component = undefined;
22
- let {image,icon,testID,color,title,toolip,src,onPress,containerProps,useSuffix,suffix,size,children,label,source,text,...rest} = props;
23
- label = defaultVal(label,text,children);
24
- if(typeof label =='number') label = label+"";
22
+ let {image,icon,testID,color,title,toolip,src,onPress,containerProps,withLabel,useSuffix,suffix,size,children,label,source,text,...rest} = props;
23
+ if(withLabel === false){
24
+ label = null;
25
+ } else {
26
+ label = defaultVal(label,text,children);
27
+ if(typeof label =='number') label = label+"";
28
+ }
25
29
  rest = defaultObj(rest);
26
30
  containerProps = defaultObj(containerProps);
27
31
  size = defaultDecimal(size,defaultSize);
@@ -67,7 +67,7 @@ export default function ImageComponent(props){
67
67
  disabled = defaultVal(disabled,false);
68
68
  readOnly = defaultBool(readOnly,false);
69
69
  menuProps = defaultObj(menuProps);
70
- round = defaultBool(round,rounded,true);
70
+ rounded = defaultBool(rounded,round,true);
71
71
  containerProps = defaultObj(containerProps);
72
72
  drawProps = defaultObj(drawProps);
73
73
  const flattenStyle = StyleSheet.flatten(props.style) || {};
@@ -271,7 +271,7 @@ export default function ImageComponent(props){
271
271
  imageProps = {imageProps}
272
272
  {...props}
273
273
  style = {[rest.style]}
274
- rounded = {round}
274
+ rounded = {rounded}
275
275
  image = {true}
276
276
  source = {source}
277
277
  />}