@fto-consult/expo-ui 7.12.2 → 7.12.3

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": "7.12.2",
3
+ "version": "7.12.3",
4
4
  "description": "Bibliothèque de composants UI Expo,react-native",
5
5
  "scripts": {
6
6
  "clear-npx-cache": "npx clear-npx-cache",
@@ -59,6 +59,7 @@ const ButtonComponent = React.forwardRef((prs,ref) => {
59
59
  noMargin,
60
60
  isAlert,
61
61
  borderRadius,
62
+ forceWhiteColorOnDarkMode,
62
63
  ...rest
63
64
  } = prs;
64
65
  isCancelButton = isCancelButton || error && true || false;
@@ -157,8 +158,8 @@ const ButtonComponent = React.forwardRef((prs,ref) => {
157
158
  backgroundColor = Colors.isValid(style.backgroundColor)?style.backgroundColor : Colors.isValid(backgroundColor)? backgroundColor : isCancelButton ? style.backgroundColor = theme.colors.error : undefined;
158
159
  borderColor = Colors.isValid(style.borderColor)? style.borderColor : isCancelButton ? theme.styles.onError : Colors.isValid(borderColor)? borderColor : undefined;
159
160
  }
160
- if(theme.isDark() && !hasElevation){
161
- //textColor = white;
161
+ if(theme.isDark() && forceWhiteColorOnDarkMode !== false && !hasElevation){
162
+ textColor = white;
162
163
  }
163
164
 
164
165
  const rippleColor = Colors.setAlpha(textColor,0.32);
@@ -451,6 +452,7 @@ ButtonComponent.propTypes = {
451
452
  iconPosition : PropTypes.oneOf([
452
453
  'top','left','bottom','right'
453
454
  ]),
455
+ forceWhiteColorOnDarkMode: PropTypes.bool,//spécifie si la couleur white sera établie comme par défaut eu mode dark
454
456
  }
455
457
 
456
458
  export const setIsLoading = (buttonRef,loading)=>{
@@ -459,7 +459,7 @@ export const RecordingButton = function({onPress,testID,...props}){
459
459
  const color = theme.Colors.setAlpha(theme.colors.text,theme.ALPHA);
460
460
  const buttonContainerProps = {style:[theme.styles.w100,theme.styles.alignItemsFlexStart]}
461
461
  return <View testID={testID+"_Container"} {...buttonContainerProps}>
462
- <Button containerProps = {buttonContainerProps} {...props} style={[{color},buttonContainerProps.style,props.style]} upperCase={false} onPress = {(...args)=>{
462
+ <Button forceWhiteColorOnDarkMode={false} containerProps = {buttonContainerProps} {...props} style={[{color},buttonContainerProps.style,props.style]} upperCase={false} onPress = {(...args)=>{
463
463
  if(onPress && onPress(...args) === false) return;
464
464
  handleCapture();
465
465
  }}