mirror of
https://github.com/element-hq/element-web
synced 2024-11-27 11:47:23 +03:00
Convert Tooltip to TypeScript
This commit is contained in:
parent
b5295b03ce
commit
19569f3897
2 changed files with 15 additions and 4 deletions
|
@ -19,8 +19,9 @@ import {_t} from "../../../languageHandler";
|
|||
import {replaceableComponent} from "../../../utils/replaceableComponent";
|
||||
|
||||
interface IProps {
|
||||
w?: number,
|
||||
h?: number,
|
||||
w?: number;
|
||||
h?: number;
|
||||
children?: React.ReactNode;
|
||||
}
|
||||
|
||||
@replaceableComponent("views.elements.InlineSpinner")
|
||||
|
@ -37,7 +38,9 @@ export default class InlineSpinner extends React.PureComponent<IProps> {
|
|||
className="mx_InlineSpinner_icon mx_Spinner_icon"
|
||||
style={{width: this.props.w, height: this.props.h}}
|
||||
aria-label={_t("Loading...")}
|
||||
/>
|
||||
>
|
||||
{this.props.children}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -19,8 +19,16 @@ import React from 'react';
|
|||
import * as sdk from '../../../index';
|
||||
import {replaceableComponent} from "../../../utils/replaceableComponent";
|
||||
|
||||
interface IProps {
|
||||
helpText: string;
|
||||
}
|
||||
|
||||
interface IState {
|
||||
hover: boolean;
|
||||
}
|
||||
|
||||
@replaceableComponent("views.elements.TooltipButton")
|
||||
export default class TooltipButton extends React.Component {
|
||||
export default class TooltipButton extends React.Component<IProps, IState> {
|
||||
state = {
|
||||
hover: false,
|
||||
};
|
Loading…
Reference in a new issue