From 0ed8c67852629ff6dea6846916f23de6b7d77ce2 Mon Sep 17 00:00:00 2001 From: KDSBrowne Date: Tue, 6 Aug 2019 12:57:26 +0000 Subject: [PATCH] fix messy layout in feedback modal for RTL --- .../meeting-ended/rating/component.jsx | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/bigbluebutton-html5/imports/ui/components/meeting-ended/rating/component.jsx b/bigbluebutton-html5/imports/ui/components/meeting-ended/rating/component.jsx index 0ecc3523d1..7e2e205c11 100755 --- a/bigbluebutton-html5/imports/ui/components/meeting-ended/rating/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/meeting-ended/rating/component.jsx @@ -1,7 +1,7 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import _ from 'lodash'; -import { defineMessages, injectIntl } from 'react-intl'; +import { defineMessages, injectIntl, intlShape } from 'react-intl'; import { styles } from './styles'; const intlMessages = defineMessages({ @@ -15,6 +15,12 @@ const intlMessages = defineMessages({ }, }); +const propTypes = { + intl: intlShape.isRequired, + onRate: PropTypes.func.isRequired, + total: PropTypes.string.isRequired, +}; + class Rating extends Component { constructor(props) { super(props); @@ -27,7 +33,8 @@ class Rating extends Component { } clickStar(e) { - this.props.onRate(e); + const { onRate } = this.props; + onRate(e); } renderStars(num) { @@ -54,9 +61,8 @@ class Rating extends Component { + aria-label={`${i + 1} ${intl.formatMessage(intlMessages.starLabel)}`} + /> ), ]).reverse() } @@ -80,3 +86,5 @@ class Rating extends Component { } export default injectIntl(Rating); + +Rating.propTypes = propTypes;