• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2022-2023 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 option in number unit of grid-container child component.
18 * @form
19 * @since 9
20 */
21declare interface GridColColumnOption {
22    /**
23     * Grid Col Column Option xs
24     * @form
25     * @since 9
26     */
27    xs?: number,
28
29    /**
30     * Grid Col Column Option sm
31     * @form
32     * @since 9
33     */
34    sm?: number,
35
36    /**
37     * Grid Col Column Option md
38     * @form
39     * @since 9
40     */
41    md?: number,
42
43    /**
44     * Grid Col Column Option lg
45     * @form
46     * @since 9
47     */
48    lg?: number,
49
50    /**
51     * Grid Col Column Option xl
52     * @form
53     * @since 9
54     */
55    xl?: number,
56
57    /**
58     * Grid Col Column Option xxl
59     * @form
60     * @since 9
61     */
62    xxl?: number,
63}
64
65/**
66 * Defines the options of grid-container child component.
67 * @form
68 * @since 9
69 */
70declare interface GridColOptions {
71    /**
72     * Sets the span of current gird-container item.
73     * @form
74     * @since 9
75     */
76    span?: number | GridColColumnOption;
77
78    /**
79     * Sets the offset of current gird-container item.
80     * @form
81     * @since 9
82     */
83    offset?: number | GridColColumnOption;
84
85    /**
86     * Sets the order of current gird-container item.
87     * @form
88     * @since 9
89     */
90    order?: number | GridColColumnOption;
91}
92
93/**
94 * Defines the the new version of grid-container child component.
95 * @form
96 * @since 9
97 */
98interface GridColInterface {
99    /**
100     * Defines the constructor of GridContainer.
101     * @form
102     * @since 9
103     */
104    (option?: GridColOptions): GridColAttribute;
105}
106
107declare class GridColAttribute extends CommonMethod<GridColAttribute> {
108    /**
109     * Sets the span of current gird-container item.
110     * @form
111     * @since 9
112     */
113    span(value: number | GridColColumnOption): GridColAttribute;
114
115    /**
116     * Sets the offset of current gird-container item.
117     * @form
118     * @since 9
119     */
120    gridColOffset(value: number | GridColColumnOption): GridColAttribute;
121
122    /**
123     * Sets the order of current gird-container item.
124     * @form
125     * @since 9
126     */
127    order(value: number | GridColColumnOption): GridColAttribute;
128}
129
130/**
131 * Defines GridCol Component.
132 * @form
133 * @since 9
134 */
135declare const GridCol: GridColInterface
136
137/**
138 * Defines GridCol Component instance.
139 * @form
140 * @since 9
141 */
142declare const GridColInstance: GridColAttribute;