mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-28 12:36:35 +00:00
Fix some react typings
This commit is contained in:
parent
1ddd2c0bf6
commit
ae82938314
3 changed files with 3 additions and 12 deletions
|
|
@ -1,20 +1,11 @@
|
|||
import React, { useState } from "react";
|
||||
import classnames from "classnames";
|
||||
|
||||
type DivProps = React.DetailedHTMLProps<
|
||||
React.HTMLAttributes<HTMLDivElement>,
|
||||
HTMLDivElement
|
||||
>;
|
||||
|
||||
interface Props extends DivProps {
|
||||
interface Props extends React.HTMLAttributes<HTMLDivElement> {
|
||||
className?: string;
|
||||
onMouseDown?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
||||
}
|
||||
|
||||
interface State {
|
||||
clicked: boolean;
|
||||
}
|
||||
|
||||
// Winamp has a strange behavior for the buttons at the top of the main window.
|
||||
// It shows through to the main background sprite until the first time that it's
|
||||
// clicked, and then it shows the dedicated undepressed sprite thereafter.
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ class Marquee extends React.Component<Props, State> {
|
|||
}
|
||||
}
|
||||
|
||||
handleMouseDown = (e: React.MouseEvent) => {
|
||||
handleMouseDown = (e: React.MouseEvent<HTMLDivElement>): void => {
|
||||
const xStart = e.clientX;
|
||||
this.setState({ stepping: false });
|
||||
const handleMouseMove = (ee: MouseEvent) => {
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ interface Props {
|
|||
}
|
||||
|
||||
export default class ResizeTarget extends React.Component<Props> {
|
||||
handleMouseDown = (e: React.MouseEvent) => {
|
||||
handleMouseDown = (e: React.MouseEvent<HTMLDivElement>) => {
|
||||
// Prevent dragging from highlighting text.
|
||||
e.preventDefault();
|
||||
const [width, height] = this.props.currentSize;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue