dhre-ui-kit 0.0.263 → 0.0.265

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
@@ -2042,7 +2042,6 @@ const styles$l = StyleSheet.create({
2042
2042
  container: {
2043
2043
  position: "absolute",
2044
2044
  alignSelf: "center",
2045
- height: verticalScale(72),
2046
2045
  width: width - horizontalScale(32),
2047
2046
  top: 56,
2048
2047
  borderRadius: moderateScale(8),
@@ -2073,20 +2072,22 @@ const styles$l = StyleSheet.create({
2073
2072
  });
2074
2073
 
2075
2074
  const Toast = React.forwardRef(
2076
- ({ sucessIcon, errorIcon, containerStyle }, ref) => {
2075
+ ({ sucessIcon, errorIcon }, ref) => {
2077
2076
  const [visible, setVisible] = useState(false);
2078
2077
  const [message, setMessage] = useState("");
2079
2078
  const [isSuccess, setIsSuccess] = useState(true);
2080
2079
  const [btnText, setBtnText] = useState(null);
2081
2080
  const [onBtnPress, setOnBtnPress] = useState(null);
2082
2081
  const [progress, setProgress] = useState(0);
2082
+ const [height, setHeight] = useState(72);
2083
2083
  const bottom = useRef(new Animated.Value(-80)).current;
2084
- const showToast = (toastMessage, duration = 3e3, success = true, buttonText = null, buttonAction = null) => {
2084
+ const showToast = (toastMessage, duration = 3e3, success = true, buttonText = null, buttonAction = null, height2 = 72) => {
2085
2085
  setMessage(toastMessage);
2086
2086
  setIsSuccess(success);
2087
2087
  setBtnText(buttonText);
2088
2088
  setOnBtnPress(() => buttonAction);
2089
2089
  setVisible(true);
2090
+ setHeight(height2);
2090
2091
  Animated.timing(bottom, {
2091
2092
  toValue: 20,
2092
2093
  duration: 500,
@@ -2126,7 +2127,7 @@ const Toast = React.forwardRef(
2126
2127
  styles$l.container,
2127
2128
  { bottom },
2128
2129
  { backgroundColor: isSuccess ? "#00B578" : "#EB0542" },
2129
- containerStyle
2130
+ { height: verticalScale(height) }
2130
2131
  ],
2131
2132
  testID: "TOAST"
2132
2133
  },