Skip to content

Commit 5c65a4f

Browse files
authored
Merge pull request #6577 from WiXSL/remove-fc-rt
Remove `FunctionComponent` usage from `RichTextInput`
2 parents 8615ffa + f820cc6 commit 5c65a4f

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

packages/ra-input-rich-text/src/index.tsx

+3-9
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
import debounce from 'lodash/debounce';
2-
import React, {
3-
useRef,
4-
useEffect,
5-
useCallback,
6-
FunctionComponent,
7-
ComponentProps,
8-
} from 'react';
2+
import React, { useRef, useEffect, useCallback, ComponentProps } from 'react';
93
import Quill, { QuillOptionsStatic } from 'quill';
104
import { useInput, FieldTitle } from 'ra-core';
115
import { InputHelperText } from 'ra-ui-materialui';
@@ -22,7 +16,7 @@ import styles from './styles';
2216

2317
const useStyles = makeStyles(styles, { name: 'RaRichTextInput' });
2418

25-
interface Props {
19+
export interface RichTextInputProps {
2620
label?: string | false;
2721
options?: QuillOptionsStatic;
2822
source: string;
@@ -45,7 +39,7 @@ interface Props {
4539
[key: string]: any;
4640
}
4741

48-
const RichTextInput: FunctionComponent<Props> = props => {
42+
const RichTextInput = (props: RichTextInputProps) => {
4943
const {
5044
options = {}, // Quill editor options
5145
toolbar = true,

0 commit comments

Comments
 (0)