Blame view

天文台pc/tianwentai-ui/node_modules/@mui/material/esm/Grid/Grid.d.ts 3.28 KB
bc518174   王天杨   提交两个项目文件
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
  import { SxProps, SystemProps } from '@mui/system';
  import { OverridableComponent, OverrideProps } from '@mui/types';
  import { Theme, Breakpoint } from "../styles/index.js";
  type ResponsiveStyleValue<T> = T | Array<T | null> | { [key in Breakpoint]?: T | null };
  export type GridDirection = 'row' | 'row-reverse' | 'column' | 'column-reverse';
  export type GridSpacing = number | string;
  export type GridWrap = 'nowrap' | 'wrap' | 'wrap-reverse';
  export type GridSize = 'auto' | 'grow' | number | false;
  export type GridOffset = 'auto' | number;
  export interface GridBaseProps {
    /**
     * The content of the component.
     */
    children?: React.ReactNode;
    /**
     * The number of columns.
     * @default 12
     */
    columns?: ResponsiveStyleValue<number>;
    /**
     * Defines the horizontal space between the type `item` components.
     * It overrides the value of the `spacing` prop.
     */
    columnSpacing?: ResponsiveStyleValue<GridSpacing>;
    /**
     * If `true`, the component will have the flex *container* behavior.
     * You should be wrapping *items* with a *container*.
     * @default false
     */
    container?: boolean;
    /**
     * Defines the `flex-direction` style property.
     * It is applied for all screen sizes.
     * @default 'row'
     */
    direction?: ResponsiveStyleValue<GridDirection>;
    /**
     * Defines the offset value for the type `item` components.
     */
    offset?: ResponsiveStyleValue<GridOffset>;
    /**
     * @internal
     * The level of the grid starts from `0` and increases when the grid nests
     * inside another grid. Nesting is defined as a container Grid being a direct
     * child of a container Grid.
     *
     * ```js
     * <Grid container> // level 0
     *   <Grid container> // level 1
     *     <Grid container> // level 2
     * ```
     *
     * Only consecutive grid is considered nesting. A grid container will start at
     * `0` if there are non-Grid container element above it.
     *
     * ```js
     * <Grid container> // level 0
     *   <div>
     *     <Grid container> // level 0
     * ```
     *
     * ```js
     * <Grid container> // level 0
     *   <Grid>
     *     <Grid container> // level 0
     * ```
     */
    unstable_level?: number;
    /**
     * Defines the vertical space between the type `item` components.
     * It overrides the value of the `spacing` prop.
     */
    rowSpacing?: ResponsiveStyleValue<GridSpacing>;
    /**
     * Defines the size of the the type `item` components.
     */
    size?: ResponsiveStyleValue<GridSize>;
    /**
     * Defines the space between the type `item` components.
     * It can only be used on a type `container` component.
     * @default 0
     */
    spacing?: ResponsiveStyleValue<GridSpacing> | undefined;
    /**
     * Defines the `flex-wrap` style property.
     * It's applied for all screen sizes.
     * @default 'wrap'
     */
    wrap?: GridWrap;
  }
  export interface GridTypeMap<P = {}, D extends React.ElementType = 'div'> {
    props: P & GridBaseProps & {
      sx?: SxProps<Theme>;
    } & SystemProps<Theme>;
    defaultComponent: D;
  }
  export type GridProps<D extends React.ElementType = GridTypeMap['defaultComponent'], P = {
    component?: React.ElementType;
  }> = OverrideProps<GridTypeMap<P, D>, D>;
  /**
   *
   * Demos:
   *
   * - [Grid](https://mui.com/material-ui/react-grid/)
   *
   * API:
   *
   * - [Grid API](https://mui.com/material-ui/api/grid/)
   */
  declare const Grid: OverridableComponent<GridTypeMap>;
  export default Grid;