Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@filerobot/explorer / lib / hooks / useIsSmallScreen.js
Size: Mime:
import { useSelector } from 'react-redux';
import { useTheme } from '@scaleflex/ui/theme/hooks';
import { selectContainerWidth } from '../slices/common.slice';

/**
 * check if the widget container <= 1085px
 *
 * @param {containerWidth} Number container width
 * @param {theme} Object Scaleflex theme
 * @returns {Boolean}
 */

var useIsSmallScreen = function useIsSmallScreen() {
  var theme = useTheme();
  var containerWidth = useSelector(selectContainerWidth);
  var mdSize = theme.breakpoints.values.lg; // 1085px

  return containerWidth <= mdSize;
};
export default useIsSmallScreen;