• 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 * Declare the stepper.
18 * @since 8
19 */
20interface StepperInterface {
21  /**
22   * Called when the stepper component is used.
23   * @since 8
24   */
25  (value?: { index?: number }): StepperAttribute;
26}
27
28/**
29 * Defines the stepper attribute functions
30 * @since 8
31 */
32declare class StepperAttribute extends CommonMethod<StepperAttribute> {
33  /**
34   * Callback when the finish label is clicked.
35   * @since 8
36   */
37  onFinish(callback: () => void): StepperAttribute;
38
39  /**
40   * Callback when the skip label is clicked.
41   * @since 8
42   */
43  onSkip(callback: () => void): StepperAttribute;
44
45  /**
46   * Callback when the change label is clicked.
47   * @since 8
48   */
49  onChange(callback: (prevIndex?: number, index?: number) => void): StepperAttribute;
50
51  /**
52   * Callback when the next label is clicked.
53   * @since 8
54   */
55  onNext(callback: (index?: number, pendingIndex?: number) => void): StepperAttribute;
56
57  /**
58   * Callback when the previous label is clicked.
59   * @since 8
60   */
61  onPrevious(callback: (index?: number, pendingIndex?: number) => void): StepperAttribute;
62}
63
64/**
65 * Defines Stepper Component.
66 * @since 8
67 */
68declare const Stepper: StepperInterface;
69
70/**
71 * Defines Stepper Component instance.
72 * @since 8
73 */
74declare const StepperInstance: StepperAttribute;
75