dhre-ui-kit 0.0.179 → 0.0.180

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/lib/index.d.ts CHANGED
@@ -632,7 +632,7 @@ interface CustomDropdownProps {
632
632
  menuContainerStyle?: ViewStyle;
633
633
  activeColor?: string;
634
634
  }
635
- declare const CustomDropdown: React$1.FC<CustomDropdownProps>;
635
+ declare const CustomDropdown: (props: CustomDropdownProps) => React$1.JSX.Element;
636
636
 
637
637
  interface CustomSwitchBtnProps {
638
638
  value: boolean;
package/lib/index.js CHANGED
@@ -252,7 +252,7 @@ const theme = {
252
252
  },
253
253
  [Theme.BORDER_SEPRATOR]: {
254
254
  light: "#F5F5F5",
255
- dark: "#404040"
255
+ dark: "#282828"
256
256
  },
257
257
  [Theme.BORDER_SEPERATOR_HEADER]: {
258
258
  light: "#E1E1E1",
@@ -3368,28 +3368,28 @@ const styles$8 = reactNative.StyleSheet.create({
3368
3368
  }
3369
3369
  });
3370
3370
 
3371
- const CustomDropdown = ({
3372
- data,
3373
- labelField = "label",
3374
- valueField = "value",
3375
- label,
3376
- placeholder,
3377
- containerStyle,
3378
- dropdownStyle,
3379
- dropdownFocusStyle,
3380
- placeholderStyle,
3381
- selectedTextStyle,
3382
- iconStyle,
3383
- labelStyle,
3384
- labelFocusStyle,
3385
- defaultValue,
3386
- iconColor,
3387
- itemTextStyle,
3388
- onValueChange,
3389
- itemContainerStyle,
3390
- menuContainerStyle,
3391
- activeColor
3392
- }) => {
3371
+ const CustomDropdown = (props) => {
3372
+ const {
3373
+ labelField = "label",
3374
+ valueField = "value",
3375
+ label,
3376
+ placeholder,
3377
+ containerStyle,
3378
+ dropdownStyle,
3379
+ dropdownFocusStyle,
3380
+ placeholderStyle,
3381
+ selectedTextStyle,
3382
+ iconStyle,
3383
+ labelStyle,
3384
+ labelFocusStyle,
3385
+ defaultValue,
3386
+ iconColor,
3387
+ itemTextStyle,
3388
+ onValueChange,
3389
+ itemContainerStyle,
3390
+ menuContainerStyle,
3391
+ activeColor
3392
+ } = props;
3393
3393
  const [value, setValue] = React.useState(defaultValue);
3394
3394
  const [isFocus, setIsFocus] = React.useState(false);
3395
3395
  const renderLabel = () => {
@@ -3427,7 +3427,6 @@ const CustomDropdown = ({
3427
3427
  placeholderStyle: [styles$7.placeholderStyle, placeholderStyle],
3428
3428
  selectedTextStyle: [styles$7.selectedTextStyle, selectedTextStyle],
3429
3429
  iconStyle: [styles$7.iconStyle, iconStyle],
3430
- data: data ?? [],
3431
3430
  labelField,
3432
3431
  valueField,
3433
3432
  placeholder: !isFocus ? placeholder : "",
@@ -3440,7 +3439,8 @@ const CustomDropdown = ({
3440
3439
  itemTextStyle,
3441
3440
  containerStyle: menuContainerStyle,
3442
3441
  activeColor,
3443
- itemContainerStyle: [styles$7.itemListStyle, itemContainerStyle]
3442
+ itemContainerStyle: [styles$7.itemListStyle, itemContainerStyle],
3443
+ ...props
3444
3444
  }
3445
3445
  ));
3446
3446
  };