Skip to content

Commit

Permalink
Merge pull request #17061 from vector-im/t3chguy/ts/1
Browse files Browse the repository at this point in the history
Convert Vector skin react components to Typescript
  • Loading branch information
t3chguy committed Apr 27, 2021
2 parents 4b3ba43 + a8429f3 commit 5ad5af7
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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,
Expand All @@ -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)',
Expand Down

0 comments on commit 5ad5af7

Please sign in to comment.