2021-07-15 09:55:58 +01:00
|
|
|
/*
|
2024-09-09 14:57:16 +01:00
|
|
|
Copyright 2024 New Vector Ltd.
|
2021-07-15 09:55:58 +01:00
|
|
|
Copyright 2021 The Matrix.org Foundation C.I.C.
|
|
|
|
|
|
2025-01-06 11:18:54 +00:00
|
|
|
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
|
2024-09-09 14:57:16 +01:00
|
|
|
Please see LICENSE files in the repository root for full details.
|
2021-07-15 09:55:58 +01:00
|
|
|
*/
|
|
|
|
|
|
2025-03-19 10:39:52 +00:00
|
|
|
import React from "react";
|
2026-01-08 11:20:55 +00:00
|
|
|
import { BackspaceSolidIcon } from "@vector-im/compound-design-tokens/assets/web/icons";
|
2021-10-22 17:23:32 -05:00
|
|
|
|
2022-01-04 08:57:46 +00:00
|
|
|
import { _t } from "../../../languageHandler";
|
2025-02-05 13:25:06 +00:00
|
|
|
import AccessibleButton, { type ButtonEvent } from "./AccessibleButton";
|
2021-07-15 09:55:58 +01:00
|
|
|
|
|
|
|
|
interface IProps {
|
|
|
|
|
// Callback for when the button is pressed
|
2021-08-12 18:58:06 +01:00
|
|
|
onBackspacePress: (ev: ButtonEvent) => void;
|
2021-07-15 09:55:58 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default class DialPadBackspaceButton extends React.PureComponent<IProps> {
|
2023-02-13 17:01:43 +00:00
|
|
|
public render(): React.ReactNode {
|
2021-07-15 09:55:58 +01:00
|
|
|
return (
|
|
|
|
|
<div className="mx_DialPadBackspaceButtonWrapper">
|
2022-01-04 08:57:46 +00:00
|
|
|
<AccessibleButton
|
|
|
|
|
className="mx_DialPadBackspaceButton"
|
|
|
|
|
onClick={this.props.onBackspacePress}
|
2023-09-05 10:44:41 +01:00
|
|
|
aria-label={_t("keyboard|backspace")}
|
2026-01-08 11:20:55 +00:00
|
|
|
>
|
|
|
|
|
<BackspaceSolidIcon />
|
|
|
|
|
</AccessibleButton>
|
2021-07-15 09:55:58 +01:00
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|