mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
fix(react): rename MediaGesture and MediaHotkey to Gesture and Hotkey (#1374)
This commit is contained in:
+12
-2
@@ -14,7 +14,7 @@ import { useEffect } from 'react';
|
||||
|
||||
import { useContainer, usePlayer } from '../../player/context';
|
||||
|
||||
export interface MediaGestureProps {
|
||||
export interface GestureProps {
|
||||
type: 'tap' | 'doubletap' | (string & {});
|
||||
action: GestureActionName | (string & {});
|
||||
value?: number;
|
||||
@@ -23,7 +23,7 @@ export interface MediaGestureProps {
|
||||
disabled?: boolean;
|
||||
}
|
||||
|
||||
export function MediaGesture({ type, action, value, pointer, region, disabled }: MediaGestureProps): ReactNode {
|
||||
export function Gesture({ type, action, value, pointer, region, disabled }: GestureProps): ReactNode {
|
||||
const store = usePlayer() as AnyPlayerStore;
|
||||
const container = useContainer();
|
||||
|
||||
@@ -48,3 +48,13 @@ export function MediaGesture({ type, action, value, pointer, region, disabled }:
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
export namespace Gesture {
|
||||
export type Props = GestureProps;
|
||||
}
|
||||
|
||||
/** @deprecated Use `GestureProps` instead. */
|
||||
export type MediaGestureProps = GestureProps;
|
||||
|
||||
/** @deprecated Use `Gesture` instead. */
|
||||
export const MediaGesture = Gesture;
|
||||
+12
-2
@@ -12,7 +12,7 @@ import { useEffect } from 'react';
|
||||
|
||||
import { useContainer, usePlayer } from '../../player/context';
|
||||
|
||||
export interface MediaHotkeyProps {
|
||||
export interface HotkeyProps {
|
||||
keys: string;
|
||||
action: HotkeyActionName | (string & {});
|
||||
value?: number;
|
||||
@@ -20,7 +20,7 @@ export interface MediaHotkeyProps {
|
||||
target?: 'player' | 'document';
|
||||
}
|
||||
|
||||
export function MediaHotkey({ keys, action, value, disabled, target }: MediaHotkeyProps): ReactNode {
|
||||
export function Hotkey({ keys, action, value, disabled, target }: HotkeyProps): ReactNode {
|
||||
const store = usePlayer() as AnyPlayerStore;
|
||||
const container = useContainer();
|
||||
|
||||
@@ -44,3 +44,13 @@ export function MediaHotkey({ keys, action, value, disabled, target }: MediaHotk
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
export namespace Hotkey {
|
||||
export type Props = HotkeyProps;
|
||||
}
|
||||
|
||||
/** @deprecated Use `HotkeyProps` instead. */
|
||||
export type MediaHotkeyProps = HotkeyProps;
|
||||
|
||||
/** @deprecated Use `Hotkey` instead. */
|
||||
export const MediaHotkey = Hotkey;
|
||||
Reference in New Issue
Block a user