Skip to content

Commit

Permalink
♻️
Browse files Browse the repository at this point in the history
  • Loading branch information
zbeyens committed Jul 14, 2023
1 parent 72fb532 commit 04cdb69
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 50 deletions.
47 changes: 9 additions & 38 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 2 additions & 11 deletions src/components/plate-ui/excalidraw-element.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,14 @@ import {
useExalidawElement,
} from '@udecode/plate-excalidraw';

export interface ExcalidrawElementProps
extends PlateElementProps<Value, TExcalidrawElement> {
scrollToContent?: boolean;

libraryItems?: any;
}

export function ExcalidrawElement({
nodeProps,
...props
}: ExcalidrawElementProps) {
const { children, element, scrollToContent, libraryItems } = props;
}: PlateElementProps<Value, TExcalidrawElement>) {
const { children, element } = props;

const { Excalidraw, excalidrawProps } = useExalidawElement({
element,
scrollToContent,
libraryItems,
});

return (
Expand Down
2 changes: 1 addition & 1 deletion src/components/plate-ui/media-popover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export function MediaPopover({ pluginKey, children }: MediaPopoverProps) {
const element = useElement();
const { props: buttonProps } = useRemoveNodeButton({ element });

if (readOnly) return <>children</>;
if (readOnly) return <>{children}</>;

return (
<Popover open={isOpen}>
Expand Down

0 comments on commit 04cdb69

Please sign in to comment.