@mui/x-charts
Version: 
The community edition of the Charts components (MUI X).
24 lines (23 loc) • 460 B
JavaScript
'use client';
import * as React from 'react';
import { DrawingContext } from "../context/DrawingProvider.js";
export function useDrawingArea() {
  const {
    left,
    top,
    width,
    height,
    bottom,
    right,
    isPointInside
  } = React.useContext(DrawingContext);
  return React.useMemo(() => ({
    left,
    top,
    width,
    height,
    bottom,
    right,
    isPointInside
  }), [height, left, top, width, bottom, right, isPointInside]);
}