Merge pull request #17061 from vector-im/t3chguy/ts/1

Convert Vector skin react components to Typescript
pull/17123/head
Michael Telatynski 2021-04-27 09:40:42 +01:00 committed by GitHub
commit 5ad5af7f20
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 10 deletions

View File

@ -24,7 +24,7 @@ export default class VectorEmbeddedPage extends EmbeddedPage {
static replaces = 'EmbeddedPage';
// we're overriding the base component here, for Element-specific tweaks
translate(s) {
translate(s: string) {
s = sanitizeHtml(_t(s));
// ugly fix for https://github.com/vector-im/element-web/issues/4243
// eslint-disable-next-line max-len

View File

@ -16,16 +16,11 @@ limitations under the License.
*/
import React from 'react';
import PropTypes from 'prop-types';
import SdkConfig from 'matrix-react-sdk/src/SdkConfig';
export default class VectorAuthHeaderLogo extends React.PureComponent {
static replaces = 'AuthHeaderLogo'
static propTypes = {
icon: PropTypes.string,
}
render() {
const brandingConfig = SdkConfig.get().branding;
let logoUrl = "themes/element/img/logos/element-logo.svg";

View File

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import React from 'react';
import React, { CSSProperties } from 'react';
import * as sdk from 'matrix-react-sdk/src/index';
import SdkConfig from 'matrix-react-sdk/src/SdkConfig';
@ -48,12 +48,12 @@ export default class VectorAuthPage extends React.PureComponent {
background: `center/cover fixed url(${VectorAuthPage.getWelcomeBackgroundUrl()})`,
};
const modalStyle = {
const modalStyle: CSSProperties = {
position: 'relative',
background: 'initial',
};
const blurStyle = {
const blurStyle: CSSProperties = {
position: 'absolute',
top: 0,
right: 0,
@ -63,7 +63,7 @@ export default class VectorAuthPage extends React.PureComponent {
background: pageStyle.background,
};
const modalContentStyle = {
const modalContentStyle: CSSProperties = {
display: 'flex',
zIndex: 1,
background: 'rgba(255, 255, 255, 0.59)',