mirror of
https://github.com/wanderer-industries/wanderer
synced 2025-12-12 02:35:42 +00:00
Initial commit
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import { MouseEvent } from 'react';
|
||||
import { WithChildren, WithClassName } from '@/hooks/Mapper/types/common.ts';
|
||||
|
||||
const preventMousedownFunc = (e: MouseEvent) => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
};
|
||||
|
||||
// TODO this components need for preventing events on headers of widgets
|
||||
// otherwise on mousedown to btn window will moving...
|
||||
export const LayoutEventBlocker = ({ children, className }: WithChildren & WithClassName) => {
|
||||
return (
|
||||
<div onMouseDown={preventMousedownFunc} className={className}>
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user