react-native-ui-lib 7.40.1-snapshot.6836 → 7.40.1-snapshot.6844

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": "react-native-ui-lib",
3
- "version": "7.40.1-snapshot.6836",
3
+ "version": "7.40.1-snapshot.6844",
4
4
  "main": "src/index.js",
5
5
  "types": "src/index.d.ts",
6
6
  "author": "Ethan Sharabi <ethan.shar@gmail.com>",
@@ -5,7 +5,9 @@ interface DrawerItemProps {
5
5
  width?: number;
6
6
  background?: string;
7
7
  text?: string;
8
+ textColor?: string;
8
9
  icon?: number;
10
+ iconColor?: string;
9
11
  onPress?: Function;
10
12
  keepOpen?: boolean;
11
13
  style?: ViewStyle;
@@ -229,14 +229,14 @@ class Drawer extends PureComponent {
229
229
  {!item.customElement && item.icon && <Animated.Image source={item.icon} style={[styles.actionIcon, {
230
230
  width: itemsIconSize,
231
231
  height: itemsIconSize,
232
- tintColor: itemsTintColor,
232
+ tintColor: item.iconColor || itemsTintColor,
233
233
  opacity,
234
234
  transform: [{
235
235
  scale
236
236
  }]
237
237
  }]} />}
238
238
  {!item.customElement && item.text && <Animated.Text style={[styles.actionText, {
239
- color: itemsTintColor,
239
+ color: item.textColor || itemsTintColor,
240
240
  opacity,
241
241
  transform: [{
242
242
  scale
@@ -49,14 +49,17 @@ const Point = props => {
49
49
  }, [type, color, label, removeIconBackground, icon]);
50
50
  const renderPointContent = () => {
51
51
  const {
52
- removeIconBackground
52
+ removeIconBackground,
53
+ labelColor
53
54
  } = props;
54
55
  const tintColor = removeIconBackground ? Colors.$iconDefault : Colors.$iconDefaultLight;
55
56
  const iconSize = removeIconBackground ? undefined : ICON_SIZE;
56
57
  if (icon) {
57
58
  return <Icon tintColor={tintColor} {...iconProps} size={iconSize} source={icon} />;
58
59
  } else if (label) {
59
- return <Text recorderTag={'unmask'} $textDefaultLight subtextBold>{label}</Text>;
60
+ return <Text recorderTag={'unmask'} $textDefaultLight subtextBold color={labelColor}>
61
+ {label}
62
+ </Text>;
60
63
  }
61
64
  };
62
65
  return <View center style={pointStyle} onLayout={onLayout}>
@@ -1,6 +1,7 @@
1
1
  import React, { useCallback, useMemo, useEffect, useState, useRef } from 'react';
2
2
  import { StyleSheet } from 'react-native';
3
3
  import { Colors, Spacings } from "../../style";
4
+ import { useThemeProps } from "../../hooks";
4
5
  import View from "../view";
5
6
  import Point from "./Point";
6
7
  import Line from "./Line";
@@ -9,12 +10,13 @@ export { TimelineProps, PointProps as TimelinePointProps, LineProps as TimelineL
9
10
  const CONTENT_CONTAINER_PADDINGS = Spacings.s2;
10
11
  const ENTRY_POINT_HEIGHT = 2;
11
12
  const Timeline = props => {
13
+ const themeProps = useThemeProps(props, 'Timeline');
12
14
  const {
13
15
  topLine,
14
16
  bottomLine,
15
17
  point,
16
18
  children
17
- } = props;
19
+ } = themeProps;
18
20
  const [anchorMeasurements, setAnchorMeasurements] = useState();
19
21
  const [contentContainerMeasurements, setContentContainerMeasurements] = useState();
20
22
  const [pointMeasurements, setPointMeasurements] = useState();
@@ -32,6 +32,7 @@ export type PointProps = {
32
32
  iconProps?: IconProps;
33
33
  removeIconBackground?: boolean;
34
34
  label?: number;
35
+ labelColor?: string;
35
36
  /** to align point to this view's center */
36
37
  anchorRef?: React.MutableRefObject<undefined>;
37
38
  };