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