Merge pull request #30186 from Kornil/slate-react/fix-RenderNodeProps

[slate-react] - Fix RenderNodeProps node prop value to Block | Inline
This commit is contained in:
Armando Aguirre
2018-11-06 13:33:26 -08:00
committed by GitHub
2 changed files with 12 additions and 10 deletions
+12 -8
View File
@@ -7,6 +7,7 @@
// Brandon Shelton <https://github.com/YangusKhan>
// Irwan Fario Subastian <https://github.com/isubasti>
// Sebastian Greaves <https://github.com/sgreav>
// Francesco Agnoletto <https://github.com/Kornil>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
import {
@@ -14,6 +15,8 @@ import {
Editor as Controller,
Mark,
Node,
Block,
Inline,
Operations,
Schema,
Stack,
@@ -40,14 +43,15 @@ export interface RenderMarkProps {
}
export interface RenderNodeProps {
attributes: RenderAttributes;
children: React.ReactNode;
editor: Controller;
isFocused: boolean;
isSelected: boolean;
node: Node;
parent: Node;
readOnly: boolean;
attributes: RenderAttributes;
children: React.ReactNode;
editor: Controller;
isFocused: boolean;
isSelected: boolean;
key: string;
node: Block | Inline;
parent: Node;
readOnly: boolean;
}
export interface RenderPlaceholderProps {
-2
View File
@@ -12,8 +12,6 @@ class MyPlugin implements Plugin {
return <div id="slate-block-test"/>;
case "inline":
return <span id="slate-inline-test">Hello world</span>;
case "text":
return <p id="slate-text-test">Hello world</p>;
default:
return undefined;
}