Migrate JumpToBottomButton to TypeScript

This commit is contained in:
Germain Souquet 2021-08-14 10:22:43 +02:00
parent 1842cd1688
commit 2e9cacdeb1

View file

@ -14,11 +14,18 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
import React from "react";
import { _t } from '../../../languageHandler'; import { _t } from '../../../languageHandler';
import AccessibleButton from '../elements/AccessibleButton'; import AccessibleButton from '../elements/AccessibleButton';
import classNames from 'classnames'; import classNames from 'classnames';
export default (props) => { interface IProps {
numUnreadMessages: number;
highlight: boolean;
onScrollToBottomClick: (e: React.MouseEvent) => void;
}
const JumpToBottomButton: React.FC<IProps> = (props) => {
const className = classNames({ const className = classNames({
'mx_JumpToBottomButton': true, 'mx_JumpToBottomButton': true,
'mx_JumpToBottomButton_highlight': props.highlight, 'mx_JumpToBottomButton_highlight': props.highlight,
@ -36,3 +43,5 @@ export default (props) => {
{ badge } { badge }
</div>); </div>);
}; };
export default JumpToBottomButton;