• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2022 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 navigation destination common title.
18 * @since 9
19 */
20declare interface NavDestinationCommonTitle {
21  /**
22   * Sets the main title.
23   * @since 9
24   */
25  main: string;
26
27  /**
28   * Sets the sub title.
29   * @since 9
30   */
31  sub: string;
32}
33
34/**
35 * Defines the navigation destination custom title.
36 * @since 9
37 */
38declare interface NavDestinationCustomTitle {
39  /**
40   * Sets the custom title builder.
41   * @since 9
42   */
43  builder: CustomBuilder;
44
45  /**
46   * Sets the custom title height.
47   * @since 9
48   */
49  height: TitleHeight | Length;
50}
51
52/**
53 * The construct function of NavDestination.
54 * @since 9
55 */
56declare interface NavDestinationInterface {
57  /**
58   * Constructor.
59   * @since 9
60   */
61  (): NavDestinationAttribute;
62}
63
64/**
65 * The attribute function of NavDestination
66 * @since 9
67 */
68declare class NavDestinationAttribute extends CommonMethod<NavDestinationAttribute> {
69  /**
70   * Navigation title bar
71   * @since 9
72   */
73  title(value: string | CustomBuilder | NavDestinationCommonTitle | NavDestinationCustomTitle): NavDestinationAttribute;
74
75  /**
76   * Hide navigation title bar
77   * @since 9
78   */
79  hideTitleBar(value: boolean): NavDestinationAttribute;
80}
81
82/**
83 * Defines NavDestination Component.
84 * @since 9
85 */
86declare const NavDestination: NavDestinationInterface;
87
88/**
89 * Defines NavDestination Component instance.
90 * @since 9
91 */
92declare const NavDestinationInstance: NavDestinationAttribute;
93