@razorpay/blade 5.1.2 → 5.1.4

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.
@@ -6685,6 +6685,16 @@ var Alert = function Alert(_ref) {
6685
6685
  throw new Error('[Blade: Alert]: SecondaryAction is allowed only when PrimaryAction is defined.');
6686
6686
  }
6687
6687
 
6688
+ var _useTheme = useTheme(),
6689
+ theme = _useTheme.theme;
6690
+
6691
+ var _useBreakpoint = useBreakpoint({
6692
+ breakpoints: theme.breakpoints
6693
+ }),
6694
+ matchedDeviceType = _useBreakpoint.matchedDeviceType;
6695
+
6696
+ var isMobile = matchedDeviceType === 'mobile';
6697
+
6688
6698
  var _useState = useState(true),
6689
6699
  _useState2 = _slicedToArray(_useState, 2),
6690
6700
  isVisible = _useState2[0],
@@ -6694,9 +6704,26 @@ var Alert = function Alert(_ref) {
6694
6704
  var iconSize = isBorderless ? 'large' : 'medium';
6695
6705
  var textSize = isBorderless ? 'medium' : 'small';
6696
6706
  var Icon = intentIconMap[intent];
6707
+ var iconOffset = 'spacing.1'; // certain special cases below needs special care for near perfect alignment
6708
+
6709
+ if (isReactNative$3) {
6710
+ if (isBorderless && !title) {
6711
+ iconOffset = 'spacing.1';
6712
+ } else if (!isBorderless && !title) {
6713
+ iconOffset = 'spacing.0';
6714
+ } else if (!isBorderless && title) {
6715
+ iconOffset = 'spacing.2';
6716
+ }
6717
+ } else if (isMobile) {
6718
+ if (!isBorderless && title) {
6719
+ iconOffset = 'spacing.2';
6720
+ } else if (isBorderless && !title) {
6721
+ iconOffset = 'spacing.2';
6722
+ }
6723
+ }
6697
6724
 
6698
6725
  var icon = /*#__PURE__*/jsx(Box, {
6699
- marginTop: "spacing.1",
6726
+ marginTop: iconOffset,
6700
6727
  display: "flex",
6701
6728
  children: /*#__PURE__*/jsx(Icon, {
6702
6729
  color: "feedback.icon.".concat(intent, ".").concat(contrastType),