@gravity-ui/uikit
Version:
Gravity UI base styling and components
21 lines (20 loc) • 572 B
TypeScript
import * as React from 'react';
import { Platform } from "./constants.js";
export interface History {
action: 'PUSH' | 'POP' | 'REPLACE' | '';
replace(location: Partial<Location>): void;
push(location: Partial<Location>): void;
goBack(): void;
}
export interface Location {
pathname: string;
search: string;
hash: string;
}
export interface MobileContextProps {
mobile: boolean;
platform: Platform;
useHistory: () => History;
useLocation: () => Location;
}
export declare const MobileContext: React.Context<MobileContextProps>;