Skip to content

Commit a8429f3

Browse files
committed
Convert Vector skin react components to Typescript
1 parent f0069c6 commit a8429f3

File tree

4 files changed

+5
-10
lines changed

4 files changed

+5
-10
lines changed

src/components/structures/VectorEmbeddedPage.js renamed to src/components/structures/VectorEmbeddedPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export default class VectorEmbeddedPage extends EmbeddedPage {
2424
static replaces = 'EmbeddedPage';
2525

2626
// we're overriding the base component here, for Element-specific tweaks
27-
translate(s) {
27+
translate(s: string) {
2828
s = sanitizeHtml(_t(s));
2929
// ugly fix for https://github.com/vector-im/element-web/issues/4243
3030
// eslint-disable-next-line max-len

src/components/views/auth/VectorAuthHeaderLogo.js renamed to src/components/views/auth/VectorAuthHeaderLogo.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,11 @@ limitations under the License.
1616
*/
1717

1818
import React from 'react';
19-
import PropTypes from 'prop-types';
2019
import SdkConfig from 'matrix-react-sdk/src/SdkConfig';
2120

2221
export default class VectorAuthHeaderLogo extends React.PureComponent {
2322
static replaces = 'AuthHeaderLogo'
2423

25-
static propTypes = {
26-
icon: PropTypes.string,
27-
}
28-
2924
render() {
3025
const brandingConfig = SdkConfig.get().branding;
3126
let logoUrl = "themes/element/img/logos/element-logo.svg";

src/components/views/auth/VectorAuthPage.js renamed to src/components/views/auth/VectorAuthPage.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
import React from 'react';
17+
import React, { CSSProperties } from 'react';
1818
import * as sdk from 'matrix-react-sdk/src/index';
1919
import SdkConfig from 'matrix-react-sdk/src/SdkConfig';
2020

@@ -48,12 +48,12 @@ export default class VectorAuthPage extends React.PureComponent {
4848
background: `center/cover fixed url(${VectorAuthPage.getWelcomeBackgroundUrl()})`,
4949
};
5050

51-
const modalStyle = {
51+
const modalStyle: CSSProperties = {
5252
position: 'relative',
5353
background: 'initial',
5454
};
5555

56-
const blurStyle = {
56+
const blurStyle: CSSProperties = {
5757
position: 'absolute',
5858
top: 0,
5959
right: 0,
@@ -63,7 +63,7 @@ export default class VectorAuthPage extends React.PureComponent {
6363
background: pageStyle.background,
6464
};
6565

66-
const modalContentStyle = {
66+
const modalContentStyle: CSSProperties = {
6767
display: 'flex',
6868
zIndex: 1,
6969
background: 'rgba(255, 255, 255, 0.59)',

0 commit comments

Comments
 (0)