utils/react: add pointerEventsNone helper

This should prevent some unnecessary rerendering by not creating a new
inline object.
This commit is contained in:
David Lechner
2022-03-12 15:26:48 -06:00
parent c51669c357
commit a2ccd3afdb
3 changed files with 9 additions and 11 deletions
+3
View File
@@ -14,3 +14,6 @@ export const preventFocusOnClick: React.MouseEventHandler = (e) => e.preventDefa
*/
export const preventBrowserNativeContextMenu: React.MouseEventHandler = (e) =>
e.preventDefault();
/** Style to disable pointer events. */
export const pointerEventsNone: React.CSSProperties = { pointerEvents: 'none' };