Migrate InlineSpinner to TypeScript
This commit is contained in:
parent
153d0ae66d
commit
d6bc1861ae
1 changed files with 14 additions and 7 deletions
|
@ -18,19 +18,26 @@ import React from "react";
|
|||
import {_t} from "../../../languageHandler";
|
||||
import {replaceableComponent} from "../../../utils/replaceableComponent";
|
||||
|
||||
@replaceableComponent("views.elements.InlineSpinner")
|
||||
export default class InlineSpinner extends React.Component {
|
||||
render() {
|
||||
const w = this.props.w || 16;
|
||||
const h = this.props.h || 16;
|
||||
interface IProps {
|
||||
w?: number,
|
||||
h?: number,
|
||||
}
|
||||
|
||||
@replaceableComponent("views.elements.InlineSpinner")
|
||||
export default class InlineSpinner extends React.PureComponent<IProps> {
|
||||
static defaultProps = {
|
||||
w: 16,
|
||||
h: 16,
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div className="mx_InlineSpinner">
|
||||
<div
|
||||
className="mx_InlineSpinner_icon mx_Spinner_icon"
|
||||
style={{width: w, height: h}}
|
||||
style={{width: this.props.w, height: this.props.h}}
|
||||
aria-label={_t("Loading...")}
|
||||
></div>
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
Loading…
Reference in a new issue