@rabex-kit/rabex-ui 0.1.56 → 0.2.0

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.
@@ -8,4 +8,5 @@ export default function useResponsive(): {
8
8
  xxl?: any;
9
9
  xxxl?: any;
10
10
  }) => any;
11
+ currentBreakpoint: string;
11
12
  };
@@ -669,8 +669,20 @@ function useResponsive() {
669
669
  if (_hasValue(props.xxxl) && isXXXL) result = props.xxxl;
670
670
  return result;
671
671
  }
672
+ // Determine current breakpoint from media queries
673
+ var getCurrentBreakpoint = function getCurrentBreakpoint() {
674
+ if (isXXXL) return 'xxxl';
675
+ if (isXXL) return 'xxl';
676
+ if (isXL) return 'xl';
677
+ if (isLG) return 'lg';
678
+ if (isMD) return 'md';
679
+ if (isSM) return 'sm';
680
+ return 'xs';
681
+ };
682
+ var currentBreakpoint = getCurrentBreakpoint();
672
683
  return {
673
- matches: matches
684
+ matches: matches,
685
+ currentBreakpoint: currentBreakpoint
674
686
  };
675
687
  }
676
688