Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[@types/react] Add onResize event to video elements #63076

Merged
merged 1 commit into from
Nov 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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