You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-08 21:42:24 +03:00
Convert SlashCommandHelpDialog to TS
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
@@ -17,11 +17,13 @@ limitations under the License.
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { _t } from "../../../languageHandler";
|
import { _t } from "../../../languageHandler";
|
||||||
import { CommandCategories, Commands } from "../../../SlashCommands";
|
import { CommandCategories, Commands } from "../../../SlashCommands";
|
||||||
import * as sdk from "../../../index";
|
import InfoDialog from "./InfoDialog";
|
||||||
|
|
||||||
export default ({ onFinished }) => {
|
interface IProps {
|
||||||
const InfoDialog = sdk.getComponent('dialogs.InfoDialog');
|
onFinished: () => void;
|
||||||
|
}
|
||||||
|
|
||||||
|
const SlashCommandHelpDialog: React.FC<IProps> = ({ onFinished }) => {
|
||||||
const categories = {};
|
const categories = {};
|
||||||
Commands.forEach(cmd => {
|
Commands.forEach(cmd => {
|
||||||
if (!cmd.isEnabled()) return;
|
if (!cmd.isEnabled()) return;
|
||||||
@@ -62,3 +64,5 @@ export default ({ onFinished }) => {
|
|||||||
hasCloseButton={true}
|
hasCloseButton={true}
|
||||||
onFinished={onFinished} />;
|
onFinished={onFinished} />;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export default SlashCommandHelpDialog;
|
||||||
Reference in New Issue
Block a user