mirror of
https://github.com/element-hq/element-web.git
synced 2024-12-12 11:24:01 +03:00
Migrate JumpToBottomButton to TypeScript
This commit is contained in:
parent
1842cd1688
commit
2e9cacdeb1
1 changed files with 10 additions and 1 deletions
|
@ -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;
|
Loading…
Reference in a new issue