• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2021 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16/**
17 * Defines the size type.
18 *
19 * @enum { number }
20 * @syscap SystemCapability.ArkUI.ArkUI.Full
21 * @since 7
22 * @deprecated since 9
23 * @useinstead grid_col/[GridColColumnOption] and grid_row/[GridRowColumnOption]
24 */
25declare enum SizeType {
26  /**
27   * Select a value based on the device type.
28   *
29   * @syscap SystemCapability.ArkUI.ArkUI.Full
30   * @since 7
31   * @deprecated since 9
32   */
33  Auto,
34
35  /**
36   * Select a value based on the device type.
37   *
38   * @syscap SystemCapability.ArkUI.ArkUI.Full
39   * @since 7
40   * @deprecated since 9
41   */
42  XS,
43
44  /**
45   * Small width type device.
46   *
47   * @syscap SystemCapability.ArkUI.ArkUI.Full
48   * @since 7
49   * @deprecated since 9
50   */
51  SM,
52
53  /**
54   * Medium width type device.
55   *
56   * @syscap SystemCapability.ArkUI.ArkUI.Full
57   * @since 7
58   * @deprecated since 9
59   */
60  MD,
61
62  /**
63   * Large width type device.
64   *
65   * @syscap SystemCapability.ArkUI.ArkUI.Full
66   * @since 7
67   * @deprecated since 9
68   */
69  LG,
70}
71
72/**
73 * Defines the options of GridContainer.
74 *
75 * @interface GridContainerOptions
76 * @syscap SystemCapability.ArkUI.ArkUI.Full
77 * @since 7
78 * @deprecated since 9
79 * @useinstead grid_col/[GridColOptions] and grid_row/[GridRowOptions]
80 */
81declare interface GridContainerOptions {
82  /**
83   * Sets the total number of columns in the current layout.
84   *
85   * @type { ?(number | "auto") }
86   * @syscap SystemCapability.ArkUI.ArkUI.Full
87   * @since 7
88   * @deprecated since 9
89   */
90  columns?: number | "auto";
91
92  /**
93   * Select the device width type.
94   *
95   * @type { ?SizeType }
96   * @syscap SystemCapability.ArkUI.ArkUI.Full
97   * @since 7
98   * @deprecated since 9
99   */
100  sizeType?: SizeType;
101
102  /**
103   * Grid layout column spacing.
104   *
105   * @type { ?(number | string) }
106   * @syscap SystemCapability.ArkUI.ArkUI.Full
107   * @since 7
108   * @deprecated since 9
109   */
110  gutter?: number | string;
111
112  /**
113   * Spacing on both sides of the grid layout.
114   *
115   * @type { ?(number | string) }
116   * @syscap SystemCapability.ArkUI.ArkUI.Full
117   * @since 7
118   * @deprecated since 9
119   */
120  margin?: number | string;
121}
122
123/**
124 * Defines the GridContainer component.
125 *
126 * @interface GridContainerInterface
127 * @syscap SystemCapability.ArkUI.ArkUI.Full
128 * @since 7
129 * @deprecated since 9
130 * @useinstead grid_col/[GridColInterface] and grid_row/[GridRowInterface]
131 */
132interface GridContainerInterface {
133  /**
134   * Defines the constructor of GridContainer.
135   *
136   * @param { GridContainerOptions } value
137   * @returns { GridContainerAttribute }
138   * @syscap SystemCapability.ArkUI.ArkUI.Full
139   * @since 7
140   * @deprecated since 9
141   */
142  (value?: GridContainerOptions): GridContainerAttribute;
143}
144
145/**
146 * Defines the grid container attribute from inheritance Column
147 *
148 * @extends ColumnAttribute
149 * @syscap SystemCapability.ArkUI.ArkUI.Full
150 * @since 7
151 * @deprecated since 9
152 * @useinstead grid_col/[GridColAttribute] and grid_row/[GridRowAttribute]
153 */
154declare class GridContainerAttribute extends ColumnAttribute {}
155
156/**
157 * Defines GridContainer Component.
158 *
159 * @syscap SystemCapability.ArkUI.ArkUI.Full
160 * @since 7
161 * @deprecated since 9
162 * @useinstead grid_col/[GridColColumnOption] and grid_row/[GridRowColumnOption]
163 */
164declare const GridContainer: GridContainerInterface
165
166/**
167 * Defines GridContainer Component instance.
168 *
169 * @syscap SystemCapability.ArkUI.ArkUI.Full
170 * @since 7
171 * @deprecated since 9
172 * @useinstead grid_col/[GridColAttribute] and grid_row/[GridRowAttribute]
173 */
174declare const GridContainerInstance: GridContainerAttribute;
175