dhre-ui-kit 0.0.376 → 0.0.378

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
@@ -344,13 +344,14 @@ const CustomTypography = ({
344
344
  style,
345
345
  text,
346
346
  testID = "CUSTOM_TYPOGRAPHY",
347
+ translateToArabic = false,
347
348
  ...props
348
349
  }) => {
349
350
  const [translatedText, setTranslatedText] = useState(text || "");
350
351
  const textStyle = FONT_STYLES[variant];
351
352
  useEffect(() => {
352
353
  const translateText = async () => {
353
- if (!text || text.trim() === "") {
354
+ if (!translateToArabic || !text || text.trim() === "") {
354
355
  setTranslatedText(text || "");
355
356
  return;
356
357
  }
@@ -363,7 +364,7 @@ const CustomTypography = ({
363
364
  }
364
365
  };
365
366
  translateText();
366
- }, [text]);
367
+ }, [text, translateToArabic]);
367
368
  return /* @__PURE__ */ React.createElement(
368
369
  Text,
369
370
  {
@@ -3724,7 +3725,7 @@ const styles$l = StyleSheet.create({
3724
3725
  });
3725
3726
 
3726
3727
  const Toast = React.forwardRef(
3727
- ({ sucessIcon, errorIcon, warningIcon }, ref) => {
3728
+ ({ sucessIcon, errorIcon, warningIcon, language }, ref) => {
3728
3729
  const [visible, setVisible] = useState(false);
3729
3730
  const [message, setMessage] = useState("");
3730
3731
  const [isSuccess, setIsSuccess] = useState(true);
@@ -3796,6 +3797,7 @@ const Toast = React.forwardRef(
3796
3797
  {
3797
3798
  variant: "L2_REGULAR",
3798
3799
  text: message,
3800
+ translateToArabic: language === "ar",
3799
3801
  style: styles$l.messageText
3800
3802
  }
3801
3803
  ), btnText && /* @__PURE__ */ React.createElement(