UNPKG

2.74 kBTypeScriptView Raw
1import * as React from 'react';
2import { Breakpoint } from '@mui/system';
3
4export interface HiddenProps {
5 /**
6 * The content of the component.
7 */
8 children?: React.ReactNode;
9 /**
10 * Specify which implementation to use. 'js' is the default, 'css' works better for
11 * server-side rendering.
12 * @default 'js'
13 */
14 implementation?: 'js' | 'css';
15 /**
16 * You can use this prop when choosing the `js` implementation with server-side rendering.
17 *
18 * As `window.innerWidth` is unavailable on the server,
19 * we default to rendering an empty component during the first mount.
20 * You might want to use a heuristic to approximate
21 * the screen width of the client browser screen width.
22 *
23 * For instance, you could be using the user-agent or the client-hints.
24 * https://caniuse.com/#search=client%20hint
25 */
26 initialWidth?: Breakpoint;
27 /**
28 * If `true`, component is hidden on screens below (but not including) this size.
29 * @default false
30 */
31 lgDown?: boolean;
32 /**
33 * If `true`, component is hidden on screens this size and above.
34 * @default false
35 */
36 lgUp?: boolean;
37 /**
38 * If `true`, component is hidden on screens below (but not including) this size.
39 * @default false
40 */
41 mdDown?: boolean;
42 /**
43 * If `true`, component is hidden on screens this size and above.
44 * @default false
45 */
46 mdUp?: boolean;
47 /**
48 * Hide the given breakpoint(s).
49 */
50 only?: Breakpoint | Breakpoint[];
51 /**
52 * If `true`, component is hidden on screens below (but not including) this size.
53 * @default false
54 */
55 smDown?: boolean;
56 /**
57 * If `true`, component is hidden on screens this size and above.
58 * @default false
59 */
60 smUp?: boolean;
61 /**
62 * If `true`, component is hidden on screens below (but not including) this size.
63 * @default false
64 */
65 xlDown?: boolean;
66 /**
67 * If `true`, component is hidden on screens this size and above.
68 * @default false
69 */
70 xlUp?: boolean;
71 /**
72 * If `true`, component is hidden on screens below (but not including) this size.
73 * @default false
74 */
75 xsDown?: boolean;
76 /**
77 * If `true`, component is hidden on screens this size and above.
78 * @default false
79 */
80 xsUp?: boolean;
81}
82
83/**
84 * Responsively hides children based on the selected implementation.
85 *
86 * Demos:
87 *
88 * - [Hidden](https://mui.com/material-ui/react-hidden/)
89 *
90 * API:
91 *
92 * - [Hidden API](https://mui.com/material-ui/api/hidden/)
93 *
94 * @deprecated The Hidden component was deprecated in Material UI v5. To learn more, see [the Hidden section](https://mui.com/material-ui/migration/v5-component-changes/#hidden) of the migration docs.
95 */
96declare const Hidden: React.JSXElementConstructor<HiddenProps>;
97
98export default Hidden;