Repository URL to install this package:
|
Version:
3.12.20 ▾
|
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;