mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-06 15:57:13 +00:00
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:
Vendored
+12
-8
@@ -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 {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user