UNPKG

@blocz/react-responsive

Version:

🔍 <Only /> displays some contents for a specific screen size

8 lines (7 loc) 388 B
import * as React from "react"; export type OnlyProps<OtherProps = Record<string, never>> = OtherProps & { matchMedia?: string; on?: string; as?: string | React.ComponentType<OtherProps>; }; export declare function Only<OtherProps = Record<string, never>>({ matchMedia, on, as, children, ...props }: React.PropsWithChildren<OnlyProps<OtherProps>>): React.ReactElement | null;