Skip to content

Commit

Permalink
[@types/react] Add onResize event to video elements (#63076)
Browse files Browse the repository at this point in the history
  • Loading branch information
Semigradsky committed Nov 4, 2022
1 parent 17956ab commit e288812
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions types/react/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
// Victor Magalhães <https://github.com/vhfmag>
// Dale Tan <https://github.com/hellatan>
// Priyanshu Rav <https://github.com/priyanshurav>
// Dmitry Semigradsky <https://github.com/Semigradsky>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8

Expand Down Expand Up @@ -1460,6 +1461,8 @@ declare namespace React {
onProgressCapture?: ReactEventHandler<T> | undefined;
onRateChange?: ReactEventHandler<T> | undefined;
onRateChangeCapture?: ReactEventHandler<T> | undefined;
onResize?: ReactEventHandler<T> | undefined;
onResizeCapture?: ReactEventHandler<T> | undefined;
onSeeked?: ReactEventHandler<T> | undefined;
onSeekedCapture?: ReactEventHandler<T> | undefined;
onSeeking?: ReactEventHandler<T> | undefined;
Expand Down
2 changes: 1 addition & 1 deletion types/react/test/elementAttributes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const testCases = [
<input type="some-type" />,
// @ts-expect-error
<input enterKeyHint="don" />,
<video disableRemotePlayback />,
<video disableRemotePlayback onResize={() => {}} />,
<picture>
<source media="test" srcSet="test" width={50} height={50} />
<img src="test" width={100} height={100} />
Expand Down

0 comments on commit e288812

Please sign in to comment.