Fix typing

pull/28788/head^2
Florian Duros 2022-10-19 18:17:03 +02:00
parent e77f333fb6
commit 0a65d919a1
No known key found for this signature in database
GPG Key ID: 9700AA5870258A0B
2 changed files with 4 additions and 6 deletions

View File

@ -22,10 +22,9 @@ import { WysiwygComposer } from './components/WysiwygComposer';
interface SendWysiwygComposerProps {
disabled?: boolean;
onChange?: (content: string) => void;
onChange: (content: string) => void;
onSend(): () => void;
}
interface ContentProps {
disabled: boolean;
formattingFunctions: FormattingFunctions;

View File

@ -15,7 +15,7 @@ limitations under the License.
*/
import React, { MouseEventHandler } from "react";
import { useWysiwyg } from "@matrix-org/matrix-wysiwyg";
import { FormattingFunctions, FormattingStates } from "@matrix-org/matrix-wysiwyg";
import classNames from "classnames";
import AccessibleTooltipButton from "../../../elements/AccessibleTooltipButton";
@ -23,7 +23,6 @@ import { Alignment } from "../../../elements/Tooltip";
import { KeyboardShortcut } from "../../../settings/KeyboardShortcut";
import { KeyCombo } from "../../../../../KeyBindingsManager";
import { _td } from "../../../../../languageHandler";
import { Wysiwyg } from "../types";
interface TooltipProps {
label: string;
@ -56,8 +55,8 @@ function Button({ label, keyCombo, onClick, isActive, className }: ButtonProps)
}
interface FormattingButtonsProps {
composer: Wysiwyg;
formattingStates: ReturnType<typeof useWysiwyg>['formattingStates'];
composer: FormattingFunctions;
formattingStates: FormattingStates;
}
export function FormattingButtons({ composer, formattingStates }: FormattingButtonsProps) {