ref(TS) Convert some native components to TS (#13307)

This commit is contained in:
Robert Pintilii
2023-05-09 12:10:46 +03:00
committed by GitHub
parent a22db037c7
commit dc037bc8dd
59 changed files with 361 additions and 371 deletions

View File

@@ -0,0 +1,34 @@
import { WithTranslation } from 'react-i18next';
import { translate } from '../../../base/i18n/functions';
import ExpandedLabel, { IProps as AbstractProps } from '../../../base/label/components/native/ExpandedLabel';
import { INSECURE_ROOM_NAME_LABEL_COLOR } from './styles';
type Props = AbstractProps & WithTranslation;
/**
* A react {@code Component} that implements an expanded label as tooltip-like
* component to explain the meaning of the {@code InsecureRoomNameExpandedLabel}.
*/
class InsecureRoomNameExpandedLabel extends ExpandedLabel<Props> {
/**
* Returns the color this expanded label should be rendered with.
*
* @returns {string}
*/
_getColor() {
return INSECURE_ROOM_NAME_LABEL_COLOR;
}
/**
* Returns the label specific text of this {@code ExpandedLabel}.
*
* @returns {string}
*/
_getLabel() {
return this.props.t('security.insecureRoomNameWarning');
}
}
export default translate(InsecureRoomNameExpandedLabel);