mirror of https://github.com/vector-im/riot-web
Fix types
parent
cba87f433b
commit
7513f5ba7c
|
@ -184,8 +184,8 @@ export default class CallPreview extends React.Component<IProps, IState> {
|
||||||
className="mx_CallPreview"
|
className="mx_CallPreview"
|
||||||
draggable={pipMode}
|
draggable={pipMode}
|
||||||
>
|
>
|
||||||
{ (onMouseDownOnHeader, onResizeHandler) => <CallView
|
{ ({ onStartMoving, onResize }) => <CallView
|
||||||
onMouseDownOnHeader={onMouseDownOnHeader}
|
onMouseDownOnHeader={onStartMoving}
|
||||||
call={this.state.primaryCall}
|
call={this.state.primaryCall}
|
||||||
secondaryCall={this.state.secondaryCall}
|
secondaryCall={this.state.secondaryCall}
|
||||||
pipMode={pipMode}
|
pipMode={pipMode}
|
||||||
|
|
|
@ -55,7 +55,7 @@ interface IProps {
|
||||||
|
|
||||||
// a callback which is called when the content in the CallView changes
|
// a callback which is called when the content in the CallView changes
|
||||||
// in a way that is likely to cause a resize.
|
// in a way that is likely to cause a resize.
|
||||||
onResize?: () => void;
|
onResize?: (event: Event) => void;
|
||||||
|
|
||||||
// Whether this call view is for picture-in-picture mode
|
// Whether this call view is for picture-in-picture mode
|
||||||
// otherwise, it's the larger call view when viewing the room the call is in.
|
// otherwise, it's the larger call view when viewing the room the call is in.
|
||||||
|
|
|
@ -35,7 +35,7 @@ const PADDING = {
|
||||||
|
|
||||||
interface IChildrenOptions {
|
interface IChildrenOptions {
|
||||||
onStartMoving: (event: React.MouseEvent<Element, MouseEvent>) => void;
|
onStartMoving: (event: React.MouseEvent<Element, MouseEvent>) => void;
|
||||||
onResize: (event: React.MouseEvent<Element, MouseEvent>) => void;
|
onResize: (event: Event) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
|
@ -218,7 +218,10 @@ export class PictureInPictureDragger extends React.Component<IProps, IState> {
|
||||||
ref={this.callViewWrapper}
|
ref={this.callViewWrapper}
|
||||||
>
|
>
|
||||||
<>
|
<>
|
||||||
{ this.props.children(this.onStartMoving) }
|
{ this.props.children({
|
||||||
|
onStartMoving: this.onStartMoving,
|
||||||
|
onResize: this.onResize,
|
||||||
|
}) }
|
||||||
</>
|
</>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue