dhre-ui-kit 0.0.304 → 0.0.306

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.mjs CHANGED
@@ -2090,7 +2090,7 @@ const styles$l = StyleSheet.create({
2090
2090
  color: "#fff"
2091
2091
  },
2092
2092
  subContainer: {
2093
- paddingHorizontal: horizontalScale(12),
2093
+ paddingHorizontal: horizontalScale(20),
2094
2094
  marginTop: verticalScale(8)
2095
2095
  },
2096
2096
  subButtonText: {
@@ -2109,12 +2109,13 @@ const Toast = React.forwardRef(
2109
2109
  const [onBtnPress, setOnBtnPress] = useState(null);
2110
2110
  const [progress, setProgress] = useState(0);
2111
2111
  const [height, setHeight] = useState(72);
2112
- const [onSubBtnPress, setOnSubBtnPress] = useState(null);
2112
+ const [onSubBtnPress, setOnSubBtnPress] = useState(
2113
+ null
2114
+ );
2113
2115
  const [subjectText, setSubjectText] = useState(null);
2114
2116
  const [warning, setWarning] = useState(false);
2115
- const [toastStyle, setToastStyle] = useState();
2116
2117
  const bottom = useRef(new Animated.Value(-80)).current;
2117
- const showToast = (toastMessage, duration = 3e3, success = true, buttonText = null, buttonAction = null, height2 = 72, subText = null, subTextPress = null, warning2 = false, tostContainerStyle) => {
2118
+ const showToast = (toastMessage, duration = 3e3, success = true, buttonText = null, buttonAction = null, height2 = 72, subText = null, subTextPress = null, warning2 = false) => {
2118
2119
  setMessage(toastMessage);
2119
2120
  setIsSuccess(success);
2120
2121
  setBtnText(buttonText);
@@ -2124,7 +2125,6 @@ const Toast = React.forwardRef(
2124
2125
  setSubjectText(subText);
2125
2126
  setOnSubBtnPress(() => subTextPress);
2126
2127
  setWarning(warning2);
2127
- setToastStyle(tostContainerStyle);
2128
2128
  Animated.timing(bottom, {
2129
2129
  toValue: 20,
2130
2130
  duration: 500,
@@ -2164,8 +2164,7 @@ const Toast = React.forwardRef(
2164
2164
  styles$l.container,
2165
2165
  { bottom },
2166
2166
  { backgroundColor: isSuccess ? "#00B578" : "#EB0542" },
2167
- { height: verticalScale(height) },
2168
- toastStyle
2167
+ { height: verticalScale(height) }
2169
2168
  ],
2170
2169
  testID: "TOAST"
2171
2170
  },
@@ -2191,8 +2190,7 @@ const Toast = React.forwardRef(
2191
2190
  style: styles$l.buttonText
2192
2191
  }
2193
2192
  )
2194
- ))),
2195
- subjectText && /* @__PURE__ */ React.createElement(View, { style: styles$l.subContainer }, /* @__PURE__ */ React.createElement(
2193
+ )), subjectText && /* @__PURE__ */ React.createElement(View, { style: styles$l.subContainer }, /* @__PURE__ */ React.createElement(
2196
2194
  Pressable,
2197
2195
  {
2198
2196
  style: styles$l.button,
@@ -2207,7 +2205,7 @@ const Toast = React.forwardRef(
2207
2205
  style: styles$l.subButtonText
2208
2206
  }
2209
2207
  )
2210
- )),
2208
+ ))),
2211
2209
  /* @__PURE__ */ React.createElement(
2212
2210
  Progress.Bar,
2213
2211
  {
@@ -3780,7 +3778,7 @@ class ToastService {
3780
3778
  setRef(ref) {
3781
3779
  this.toastRef = ref;
3782
3780
  }
3783
- showToast(message, duration = 3e3, isSuccess = true, buttonText = null, buttonAction = null, height = 72, subText = null, subTextPress = null, warning = false, tostContainerStyle = {}) {
3781
+ showToast(message, duration = 3e3, isSuccess = true, buttonText = null, buttonAction = null, height = 72, subText = null, subTextPress = null, warning = false) {
3784
3782
  if (this.toastRef) {
3785
3783
  this.toastRef.showToast(
3786
3784
  message,
@@ -3791,8 +3789,7 @@ class ToastService {
3791
3789
  height,
3792
3790
  subText,
3793
3791
  subTextPress,
3794
- warning,
3795
- tostContainerStyle
3792
+ warning
3796
3793
  );
3797
3794
  }
3798
3795
  }