Fix typing
This commit is contained in:
parent
e77f333fb6
commit
0a65d919a1
2 changed files with 4 additions and 6 deletions
|
@ -22,10 +22,9 @@ import { WysiwygComposer } from './components/WysiwygComposer';
|
||||||
|
|
||||||
interface SendWysiwygComposerProps {
|
interface SendWysiwygComposerProps {
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
onChange?: (content: string) => void;
|
onChange: (content: string) => void;
|
||||||
onSend(): () => void;
|
onSend(): () => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ContentProps {
|
interface ContentProps {
|
||||||
disabled: boolean;
|
disabled: boolean;
|
||||||
formattingFunctions: FormattingFunctions;
|
formattingFunctions: FormattingFunctions;
|
||||||
|
|
|
@ -15,7 +15,7 @@ limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React, { MouseEventHandler } from "react";
|
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 classNames from "classnames";
|
||||||
|
|
||||||
import AccessibleTooltipButton from "../../../elements/AccessibleTooltipButton";
|
import AccessibleTooltipButton from "../../../elements/AccessibleTooltipButton";
|
||||||
|
@ -23,7 +23,6 @@ import { Alignment } from "../../../elements/Tooltip";
|
||||||
import { KeyboardShortcut } from "../../../settings/KeyboardShortcut";
|
import { KeyboardShortcut } from "../../../settings/KeyboardShortcut";
|
||||||
import { KeyCombo } from "../../../../../KeyBindingsManager";
|
import { KeyCombo } from "../../../../../KeyBindingsManager";
|
||||||
import { _td } from "../../../../../languageHandler";
|
import { _td } from "../../../../../languageHandler";
|
||||||
import { Wysiwyg } from "../types";
|
|
||||||
|
|
||||||
interface TooltipProps {
|
interface TooltipProps {
|
||||||
label: string;
|
label: string;
|
||||||
|
@ -56,8 +55,8 @@ function Button({ label, keyCombo, onClick, isActive, className }: ButtonProps)
|
||||||
}
|
}
|
||||||
|
|
||||||
interface FormattingButtonsProps {
|
interface FormattingButtonsProps {
|
||||||
composer: Wysiwyg;
|
composer: FormattingFunctions;
|
||||||
formattingStates: ReturnType<typeof useWysiwyg>['formattingStates'];
|
formattingStates: FormattingStates;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function FormattingButtons({ composer, formattingStates }: FormattingButtonsProps) {
|
export function FormattingButtons({ composer, formattingStates }: FormattingButtonsProps) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue