Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

InsecureRoomNameExpandedLabel.js 944B

123456789101112131415161718192021222324252627282930313233343536
  1. // @flow
  2. import { translate } from '../../../base/i18n';
  3. import { ExpandedLabel, type Props as AbstractProps } from '../../../base/label';
  4. import { INSECURE_ROOM_NAME_LABEL_COLOR } from './styles';
  5. type Props = AbstractProps & {
  6. t: Function
  7. }
  8. /**
  9. * A react {@code Component} that implements an expanded label as tooltip-like
  10. * component to explain the meaning of the {@code InsecureRoomNameExpandedLabel}.
  11. */
  12. class InsecureRoomNameExpandedLabel extends ExpandedLabel<Props> {
  13. /**
  14. * Returns the color this expanded label should be rendered with.
  15. *
  16. * @returns {string}
  17. */
  18. _getColor() {
  19. return INSECURE_ROOM_NAME_LABEL_COLOR;
  20. }
  21. /**
  22. * Returns the label specific text of this {@code ExpandedLabel}.
  23. *
  24. * @returns {string}
  25. */
  26. _getLabel() {
  27. return this.props.t('security.insecureRoomNameWarning');
  28. }
  29. }
  30. export default translate(InsecureRoomNameExpandedLabel);