• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2023-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 * @file
18 * @kit ArkUI
19 */
20
21/**
22 * Declare Component ProgressButton
23 * @syscap SystemCapability.ArkUI.ArkUI.Full
24 * @since 10
25 */
26/**
27 * Declare Component ProgressButton
28 * @syscap SystemCapability.ArkUI.ArkUI.Full
29 * @atomicservice
30 * @since 11
31 */
32@Component
33export declare struct ProgressButton {
34  /**
35   * Sets the ProgressButton progress.
36   * @type { number }.
37   * @syscap SystemCapability.ArkUI.ArkUI.Full
38   * @since 10
39   */
40  /**
41   * Sets the ProgressButton progress.
42   * @type { number }.
43   * @syscap SystemCapability.ArkUI.ArkUI.Full
44   * @atomicservice
45   * @since 11
46   */
47  @Prop progress: number;
48
49  /**
50   * Sets the ProgressButton content.
51   * @type { string }.
52   * @syscap SystemCapability.ArkUI.ArkUI.Full
53   * @since 10
54   */
55  /**
56   * Sets the ProgressButton content.
57   * @type { string }.
58   * @syscap SystemCapability.ArkUI.ArkUI.Full
59   * @atomicservice
60   * @since 11
61   */
62  /**
63   * Sets the ProgressButton content.
64   * @type { ResourceStr }.
65   * @syscap SystemCapability.ArkUI.ArkUI.Full
66   * @crossplatform
67   * @atomicservice
68   * @since 20
69   */
70  @Prop content: ResourceStr;
71
72  /**
73   * Sets the ProgressButton progressButtonWidth.
74   * @type { ?Length }.
75   * @syscap SystemCapability.ArkUI.ArkUI.Full
76   * @since 10
77   */
78  /**
79   * Sets the ProgressButton progressButtonWidth.
80   * @type { ?Length }.
81   * @syscap SystemCapability.ArkUI.ArkUI.Full
82   * @atomicservice
83   * @since 11
84   */
85  progressButtonWidth?: Length;
86
87  /**
88   * Sets the ProgressButton clickCallback.
89   * @type { () => void }.
90   * @syscap SystemCapability.ArkUI.ArkUI.Full
91   * @since 10
92   */
93  /**
94   * Sets the ProgressButton clickCallback.
95   * @type { () => void }.
96   * @syscap SystemCapability.ArkUI.ArkUI.Full
97   * @atomicservice
98   * @since 11
99   */
100  clickCallback: () => void;
101
102  /**
103   * Sets the ProgressButton enable state.
104   * @type { boolean }.
105   * @syscap SystemCapability.ArkUI.ArkUI.Full
106   * @since 10
107   */
108  /**
109   * Sets the ProgressButton enable state.
110   * @type { boolean }.
111   * @syscap SystemCapability.ArkUI.ArkUI.Full
112   * @atomicservice
113   * @since 11
114   */
115  @Prop enable: boolean;
116
117  /**
118   * Set Color options of the ProgressButton.
119   *
120   * @type { ?ProgressButtonColorOptions }
121   * @syscap SystemCapability.ArkUI.ArkUI.Full
122   * @atomicservice
123   * @since 18
124   */
125  @Prop colorOptions?: ProgressButtonColorOptions;
126
127  /**
128   * Set border rounded corner radius of progress.
129   *
130   * @type { ?LengthMetrics }
131   * @syscap SystemCapability.ArkUI.ArkUI.Full
132   * @crossplatform
133   * @atomicservice
134   * @since 18
135   */
136  @Prop progressButtonRadius?: LengthMetrics;
137}
138
139/**
140 * Declare Color options of the ProgressButton.
141 *
142 * @interface ProgressButtonColorOptions
143 * @syscap SystemCapability.ArkUI.ArkUI.Full
144 * @atomicservice
145 * @since 18
146 */
147export declare interface ProgressButtonColorOptions {
148
149  /**
150   * Set progress color of the ProgressButton.
151   *
152   * @type { ?ResourceColor }.
153   * @syscap SystemCapability.ArkUI.ArkUI.Full
154   * @atomicservice
155   * @since 18
156   */
157  progressColor?: ResourceColor;
158
159  /**
160   * Set border color of the ProgressButton.
161   *
162   * @type { ?ResourceColor }.
163   * @syscap SystemCapability.ArkUI.ArkUI.Full
164   * @atomicservice
165   * @since 18
166   */
167  borderColor?: ResourceColor;
168
169  /**
170   * Set text color of the ProgressButton.
171   *
172   * @type { ?ResourceColor }.
173   * @syscap SystemCapability.ArkUI.ArkUI.Full
174   * @atomicservice
175   * @since 18
176   */
177  textColor?: ResourceColor;
178
179  /**
180   * Set background color of the ProgressButton.
181   *
182   * @type { ?ResourceColor }.
183   * @syscap SystemCapability.ArkUI.ArkUI.Full
184   * @atomicservice
185   * @since 18
186   */
187  backgroundColor?: ResourceColor;
188}