Skip to content

Commit 522a87f

Browse files
committed
fix: fix TypeScript type
1 parent 6f75dcb commit 522a87f

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@coze-editor/react-components",
5+
"comment": "fix TypeScript type",
6+
"type": "patch"
7+
}
8+
],
9+
"packageName": "@coze-editor/react-components",
10+
"email": "[email protected]"
11+
}

packages/text-editor/react-components/src/placeholder/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
// SPDX-License-Identifier: MIT
33

44
import { createPortal } from 'react-dom';
5-
import { type ReactNode } from 'react';
5+
import { type ReactPortal, type ReactNode } from 'react';
66

77
import { useHTMLElement, useInjectorEffect } from '@coze-editor/react-hooks';
88
import {
99
placeholder,
1010
activeLinePlaceholder,
1111
} from '@coze-editor/extension-placeholder';
1212

13-
function Placeholder({ children }: { children?: ReactNode }): ReactNode {
13+
function Placeholder({ children }: { children?: ReactNode }): ReactPortal {
1414
const element = useHTMLElement('span');
1515

1616
useInjectorEffect(
@@ -27,7 +27,7 @@ interface ActiveLinePlaceholderProps {
2727

2828
function ActiveLinePlaceholder({
2929
children,
30-
}: ActiveLinePlaceholderProps): ReactNode {
30+
}: ActiveLinePlaceholderProps): ReactPortal {
3131
const element = useHTMLElement('span');
3232

3333
useInjectorEffect(

0 commit comments

Comments
 (0)