Use MouseEventHandler as type
This commit is contained in:
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React from "react";
|
import React, { MouseEventHandler } from "react";
|
||||||
import { useWysiwyg } from "@matrix-org/matrix-wysiwyg";
|
import { useWysiwyg } from "@matrix-org/matrix-wysiwyg";
|
||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
|
|
||||||
@@ -39,7 +39,7 @@ function Tooltip({ label, keyCombo }: TooltipProps) {
|
|||||||
interface ButtonProps extends TooltipProps {
|
interface ButtonProps extends TooltipProps {
|
||||||
className: string;
|
className: string;
|
||||||
isActive: boolean;
|
isActive: boolean;
|
||||||
onClick: () => void;
|
onClick: MouseEventHandler<HTMLButtonElement>;
|
||||||
}
|
}
|
||||||
|
|
||||||
function Button({ label, keyCombo, onClick, isActive, className }: ButtonProps) {
|
function Button({ label, keyCombo, onClick, isActive, className }: ButtonProps) {
|
||||||
|
|||||||
Reference in New Issue
Block a user