mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-29 00:20:04 +01:00
fix: disable resizer for readonly editor
This commit is contained in:
@@ -13,6 +13,8 @@ type ResizerProps = {
|
||||
export function Resizer(props: PropsWithChildren<ResizerProps>) {
|
||||
const { editor, selected, onResize, width, height, children } = props;
|
||||
|
||||
if (!editor.isEditable) return <>{children}</>;
|
||||
|
||||
return (
|
||||
<Resizable
|
||||
enable={{
|
||||
@@ -21,7 +23,7 @@ export function Resizer(props: PropsWithChildren<ResizerProps>) {
|
||||
right: false,
|
||||
top: false,
|
||||
bottomLeft: false,
|
||||
bottomRight: editor.isEditable && selected,
|
||||
bottomRight: selected,
|
||||
topLeft: false,
|
||||
topRight: false,
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user