mirror of
https://github.com/pybricks/pybricks-code.git
synced 2026-09-12 09:36:27 +00:00
utils/react: add pointerEventsNone helper
This should prevent some unnecessary rerendering by not creating a new inline object.
This commit is contained in:
@@ -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' };
|
||||
|
||||
Reference in New Issue
Block a user