import { useRecoilValue } from 'recoil';
import { breakpointDimensions } from "../../../atoms/breakpoint/index.js";

/**
 * Get the dimensions of a breakpoint measurement as a two element array
 * `[width, height]` of numerical pixel values.
 */
const useBreakpointDimensions = function useBreakpointDimensions(key = 'window') {
  return useRecoilValue(breakpointDimensions(key));
};
export default useBreakpointDimensions;