mirror of
https://github.com/movie-web/native-app.git
synced 2025-09-13 10:43:25 +00:00
15 lines
427 B
TypeScript
15 lines
427 B
TypeScript
import type { ViewProps } from "tamagui";
|
|
import React from "react";
|
|
import { View } from "tamagui";
|
|
|
|
import { usePlayerStore } from "~/stores/player/store";
|
|
|
|
interface ControlsProps extends ViewProps {
|
|
children: React.ReactNode;
|
|
}
|
|
|
|
export const Controls = ({ children, ...props }: ControlsProps) => {
|
|
const idle = usePlayerStore((state) => state.interface.isIdle);
|
|
return <View {...props}>{!idle && children}</View>;
|
|
};
|