UNPKG

@steambrew/client

Version:
32 lines (31 loc) 812 B
/** * Returns state indicating the visibility of quick access menu. * * @returns `true` if quick access menu is visible and `false` otherwise. * * @example * import { FC, useEffect } from "react"; * import { useQuickAccessVisible } from "decky-frontend-lib"; * * export const PluginPanelView: FC<{}> = ({ }) => { * const isVisible = useQuickAccessVisible(); * * useEffect(() => { * if (!isVisible) { * return; * } * * const interval = setInterval(() => console.log("Hello world!"), 1000); * return () => { * clearInterval(interval); * } * }, [isVisible]) * * return ( * <div> * {isVisible ? "VISIBLE" : "INVISIBLE"} * </div> * ); * }; */ export declare function useQuickAccessVisible(): boolean;