• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2024 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 Defines WithTheme component.
18 * @kit ArkUI
19 */
20
21
22/**
23 * CustomTheme.
24 *
25 * @typedef {import('../api/@ohos.arkui.theme').CustomTheme} CustomTheme
26 * @syscap SystemCapability.ArkUI.ArkUI.Full
27 * @crossplatform
28 * @atomicservice
29 * @since 12
30 */
31declare type CustomTheme = import('../api/@ohos.arkui.theme').CustomTheme;
32
33/**
34 * Defines the struct of WithThemeOptions.
35 *
36 * @interface WithThemeOptions
37 * @syscap SystemCapability.ArkUI.ArkUI.Full
38 * @crossplatform
39 * @atomicservice
40 * @since 12
41 */
42declare interface WithThemeOptions {
43    /**
44    * Custom Theme.
45    *
46    * @type { ?CustomTheme }
47    * @syscap SystemCapability.ArkUI.ArkUI.Full
48    * @crossplatform
49    * @atomicservice
50    * @since 12
51    */
52    theme?: CustomTheme;
53
54    /**
55    * Theme Color Mode.
56    *
57    * @type { ?ThemeColorMode }
58    * @syscap SystemCapability.ArkUI.ArkUI.Full
59    * @crossplatform
60    * @atomicservice
61    * @since 12
62    */
63    colorMode?: ThemeColorMode;
64}
65
66/**
67* Define the function of WithThemeInterface.
68*
69* @typedef { function } WithThemeInterface
70* @param { WithThemeOptions } options
71* @returns { WithThemeAttribute } withThemeAttribute object
72* @syscap SystemCapability.ArkUI.ArkUI.Full
73* @crossplatform
74* @atomicservice
75* @since 12
76*/
77declare type WithThemeInterface = (options: WithThemeOptions) => WithThemeAttribute;
78
79/**
80* Defines the WithTheme attribute functions..
81*
82* @syscap SystemCapability.ArkUI.ArkUI.Full
83* @crossplatform
84* @atomicservice
85* @since 12
86*/
87declare class WithThemeAttribute {
88}
89
90/**
91* Defines WithTheme Logic Component.
92*
93* @syscap SystemCapability.ArkUI.ArkUI.Full
94* @crossplatform
95* @atomicservice
96* @since 12
97*/
98declare const WithTheme: WithThemeInterface;
99
100/**
101* Defines WithTheme Logic Component Instance.
102*
103* @syscap SystemCapability.ArkUI.ArkUI.Full
104* @crossplatform
105* @atomicservice
106* @since 12
107*/
108declare const WithThemeInstance: WithThemeAttribute;