-
-
Notifications
You must be signed in to change notification settings - Fork 32.7k
Expand file tree
/
Copy pathMasonry.d.ts
More file actions
74 lines (69 loc) · 2.16 KB
/
Masonry.d.ts
File metadata and controls
74 lines (69 loc) · 2.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
import { ResponsiveStyleValue, SxProps } from '@mui/system';
import { OverridableComponent, OverrideProps } from '@mui/material/OverridableComponent';
import { Theme, CreateThemeComponent } from '@mui/material/stylesOptimized';
import { MasonryClasses, MasonryClassKey } from './masonryClasses';
export interface MasonryOwnProps {
/**
* The content of the component.
*/
children: NonNullable<React.ReactNode>;
/**
* Override or extend the styles applied to the component.
*/
classes?: Partial<MasonryClasses>;
/**
* Number of columns.
* @default 4
*/
columns?: ResponsiveStyleValue<number | string>;
/**
* The default number of columns of the component. This is provided for server-side rendering.
*/
defaultColumns?: number;
/**
* The default height of the component in px. This is provided for server-side rendering.
*/
defaultHeight?: number;
/**
* The default spacing of the component. Like `spacing`, it is a factor of the theme's spacing. This is provided for server-side rendering.
*/
defaultSpacing?: number;
/**
* Defines the space between children. It is a factor of the theme's spacing.
* @default 1
*/
spacing?: ResponsiveStyleValue<number | string>;
/**
* Allows using sequential order rather than adding to shortest column
* @default false
*/
sequential?: boolean;
/**
* Allows defining system overrides as well as additional CSS styles.
*/
sx?: SxProps<Theme>;
}
export interface MasonryTypeMap<
AdditionalProps = {},
RootComponent extends React.ElementType = 'div',
> {
props: AdditionalProps & MasonryOwnProps;
defaultComponent: RootComponent;
}
/**
*
* Demos:
*
* - [Masonry](https://mui.com/material-ui/react-masonry/)
*
* API:
*
* - [Masonry API](https://mui.com/material-ui/api/masonry/)
*/
declare const Masonry: OverridableComponent<MasonryTypeMap>;
export type MasonryProps<
RootComponent extends React.ElementType = MasonryTypeMap['defaultComponent'],
AdditionalProps = {},
> = OverrideProps<MasonryTypeMap<AdditionalProps, RootComponent>, RootComponent>;
export type MasonryTheme = CreateThemeComponent<MasonryClassKey, MasonryProps>;
export default Masonry;