This repository was archived by the owner on Sep 11, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Original file line number Diff line number Diff line change 1+ /*
2+ Copyright 2022 The Matrix.org Foundation C.I.C.
3+
4+ Licensed under the Apache License, Version 2.0 (the "License");
5+ you may not use this file except in compliance with the License.
6+ You may obtain a copy of the License at
7+
8+ http://www.apache.org/licenses/LICENSE-2.0
9+
10+ Unless required by applicable law or agreed to in writing, software
11+ distributed under the License is distributed on an "AS IS" BASIS,
12+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ See the License for the specific language governing permissions and
14+ limitations under the License.
15+ */
16+
17+ // TODO: @@ Is this future-proof enough? Will we remember to do this for new components?
18+ import { TextInputField } from "@matrix-org/react-sdk-module-api/lib/components/TextInputField" ;
19+ import { Spinner as ModuleSpinner } from "@matrix-org/react-sdk-module-api/lib/components/Spinner" ;
20+ import React from "react" ;
21+ import Field from "../components/views/elements/Field" ;
22+ import Spinner from "../components/views/elements/Spinner" ;
23+
24+ TextInputField . renderFactory = ( props ) => (
25+ < Field
26+ type = "text"
27+ value = { props . value }
28+ onChange = { e => props . onChange ( e . target . value ) }
29+ label = { props . label }
30+ autoComplete = "off"
31+ />
32+ ) ;
33+ ModuleSpinner . renderFactory = ( ) => < Spinner /> ;
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ import { TranslationStringsObject } from "@matrix-org/react-sdk-module-api/lib/t
1818import { AppModule } from "./AppModule" ;
1919import { ModuleFactory } from "./ModuleFactory" ;
2020import { AnyLifecycle } from "@matrix-org/react-sdk-module-api/lib/lifecycles/types" ;
21+ import "./ModuleComponents" ;
2122
2223export class ModuleRunner {
2324 public static readonly instance = new ModuleRunner ( ) ;
You can’t perform that action at this time.
0 commit comments