From 92b9f38bec2a84b52fb0ae682c3f62ea83fcc0e0 Mon Sep 17 00:00:00 2001 From: ReekyStive Date: Tue, 20 Aug 2024 17:40:59 +0800 Subject: [PATCH] feat(lexical): change className props in TreeView component to optional --- packages/lexical-devtools-core/src/TreeView.tsx | 12 ++++++------ packages/lexical-react/src/LexicalTreeView.tsx | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/lexical-devtools-core/src/TreeView.tsx b/packages/lexical-devtools-core/src/TreeView.tsx index 0ed8aea6ec4..65bc7e51e16 100644 --- a/packages/lexical-devtools-core/src/TreeView.tsx +++ b/packages/lexical-devtools-core/src/TreeView.tsx @@ -17,12 +17,12 @@ export const TreeView = forwardRef< HTMLPreElement, { editorState: EditorState; - treeTypeButtonClassName: string; - timeTravelButtonClassName: string; - timeTravelPanelButtonClassName: string; - timeTravelPanelClassName: string; - timeTravelPanelSliderClassName: string; - viewClassName: string; + treeTypeButtonClassName?: string; + timeTravelButtonClassName?: string; + timeTravelPanelButtonClassName?: string; + timeTravelPanelClassName?: string; + timeTravelPanelSliderClassName?: string; + viewClassName?: string; generateContent: (exportDOM: boolean) => Promise; setEditorState: (state: EditorState, options?: EditorSetOptions) => void; setEditorReadOnly: (isReadonly: boolean) => void; diff --git a/packages/lexical-react/src/LexicalTreeView.tsx b/packages/lexical-react/src/LexicalTreeView.tsx index c3a282b4760..db536de589b 100644 --- a/packages/lexical-react/src/LexicalTreeView.tsx +++ b/packages/lexical-react/src/LexicalTreeView.tsx @@ -29,12 +29,12 @@ export function TreeView({ customPrintNode, }: { editor: LexicalEditor; - treeTypeButtonClassName: string; - timeTravelButtonClassName: string; - timeTravelPanelButtonClassName: string; - timeTravelPanelClassName: string; - timeTravelPanelSliderClassName: string; - viewClassName: string; + treeTypeButtonClassName?: string; + timeTravelButtonClassName?: string; + timeTravelPanelButtonClassName?: string; + timeTravelPanelClassName?: string; + timeTravelPanelSliderClassName?: string; + viewClassName?: string; customPrintNode?: CustomPrintNodeFn; }): JSX.Element { const treeElementRef = React.createRef();