• 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 * @file
18 * @kit ArkUI
19 */
20
21/**
22 * Defines the size type.
23 *
24 * @enum { number }
25 * @syscap SystemCapability.ArkUI.ArkUI.Full
26 * @since 7
27 * @deprecated since 9
28 * @useinstead grid_col/GridColColumnOption and grid_row/GridRowColumnOption
29 */
30declare enum SizeType {
31  /**
32   * Select a value based on the device type.
33   *
34   * @syscap SystemCapability.ArkUI.ArkUI.Full
35   * @since 7
36   * @deprecated since 9
37   */
38  Auto,
39
40  /**
41   * Select a value based on the device type.
42   *
43   * @syscap SystemCapability.ArkUI.ArkUI.Full
44   * @since 7
45   * @deprecated since 9
46   */
47  XS,
48
49  /**
50   * Small width type device.
51   *
52   * @syscap SystemCapability.ArkUI.ArkUI.Full
53   * @since 7
54   * @deprecated since 9
55   */
56  SM,
57
58  /**
59   * Medium width type device.
60   *
61   * @syscap SystemCapability.ArkUI.ArkUI.Full
62   * @since 7
63   * @deprecated since 9
64   */
65  MD,
66
67  /**
68   * Large width type device.
69   *
70   * @syscap SystemCapability.ArkUI.ArkUI.Full
71   * @since 7
72   * @deprecated since 9
73   */
74  LG,
75}
76
77/**
78 * Defines the options of GridContainer.
79 *
80 * @interface GridContainerOptions
81 * @syscap SystemCapability.ArkUI.ArkUI.Full
82 * @since 7
83 * @deprecated since 9
84 * @useinstead grid_col/GridColOptions and grid_row/GridRowOptions
85 */
86declare interface GridContainerOptions {
87  /**
88   * Sets the total number of columns in the current layout.
89   *
90   * @type { ?(number | "auto") }
91   * @syscap SystemCapability.ArkUI.ArkUI.Full
92   * @since 7
93   * @deprecated since 9
94   */
95  columns?: number | "auto";
96
97  /**
98   * Select the device width type.
99   *
100   * @type { ?SizeType }
101   * @syscap SystemCapability.ArkUI.ArkUI.Full
102   * @since 7
103   * @deprecated since 9
104   */
105  sizeType?: SizeType;
106
107  /**
108   * Grid layout column spacing.
109   *
110   * @type { ?(number | string) }
111   * @syscap SystemCapability.ArkUI.ArkUI.Full
112   * @since 7
113   * @deprecated since 9
114   */
115  gutter?: number | string;
116
117  /**
118   * Spacing on both sides of the grid layout.
119   *
120   * @type { ?(number | string) }
121   * @syscap SystemCapability.ArkUI.ArkUI.Full
122   * @since 7
123   * @deprecated since 9
124   */
125  margin?: number | string;
126}
127
128/**
129 * Defines the GridContainer component.
130 *
131 * @interface GridContainerInterface
132 * @syscap SystemCapability.ArkUI.ArkUI.Full
133 * @since 7
134 * @deprecated since 9
135 * @useinstead grid_col/GridColInterface and grid_row/GridRowInterface
136 */
137interface GridContainerInterface {
138  /**
139   * Defines the constructor of GridContainer.
140   *
141   * @param { GridContainerOptions } value
142   * @returns { GridContainerAttribute }
143   * @syscap SystemCapability.ArkUI.ArkUI.Full
144   * @since 7
145   * @deprecated since 9
146   */
147  (value?: GridContainerOptions): GridContainerAttribute;
148}
149
150/**
151 * Defines the grid container attribute from inheritance Column
152 *
153 * @extends ColumnAttribute
154 * @syscap SystemCapability.ArkUI.ArkUI.Full
155 * @since 7
156 * @deprecated since 9
157 * @useinstead grid_col/GridColAttribute and grid_row/GridRowAttribute
158 */
159declare class GridContainerAttribute extends ColumnAttribute {}
160
161/**
162 * Defines GridContainer Component.
163 *
164 * @syscap SystemCapability.ArkUI.ArkUI.Full
165 * @since 7
166 * @deprecated since 9
167 * @useinstead grid_col/GridColColumnOption and grid_row/GridRowColumnOption
168 */
169declare const GridContainer: GridContainerInterface
170
171/**
172 * Defines GridContainer Component instance.
173 *
174 * @syscap SystemCapability.ArkUI.ArkUI.Full
175 * @since 7
176 * @deprecated since 9
177 * @useinstead grid_col/GridColAttribute and grid_row/GridRowAttribute
178 */
179declare const GridContainerInstance: GridContainerAttribute;
180