import { ClassNameMap } from '@material-ui/styles'; import React from 'react'; interface Result extends ClassNameMap<'content' | 'contentShift'> { /** * Reference to the note insert root element. This is used to calculate * whether the insert needs shift up when the drawer opens. */ insertRef: React.RefObject; /** * Reference to the element where the drawer is docked. This depends on * the the drawer dock position being absolutely where * the drawer will appear post-animation. It's used to calculate the * drawer top's y-coordinate to determine if it will overlap the note * insert. */ drawerDockRef: React.RefObject; /** * Reference to the actual textarea element. */ textAreaRef: React.RefObject; /** * Reference to the first scrollable parent element. Since bounding rect * coordinates are relative to the window, but when the shift is applied * all scoll will be reset, we need to be able to do the calculation as * if the element was not scrolled. */ scrollableParentRef: React.RefObject; /** * Reference to the editor sticky header. Used to figure out how much * space if left over once the drawer is shifted so it can be roughly * centered in the upper portion of the screen. */ editorHeaderRef: (el: HTMLDivElement | null) => void; } /** * Match the material drawer transitions without needing to override them. */ declare const useEditorDrawerContentShift: () => Result; export default useEditorDrawerContentShift;