• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/**
2 * Copyright (c) 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@Component
16export struct SubHeader {
17  @State titleContent: any = '';
18  @Prop subTitleContent: string;
19
20  titleContenet() {
21    return this.titleContenet()
22  }
23
24  build() {
25    Row() {
26      Text(this.titleContent)
27        .fontSize(14)
28        .fontColor($r('sys.color.ohos_id_color_text_secondary'))
29        .fontFamily('HarmonyHeiTi')
30        .fontWeight(FontWeight.Medium)
31      Text(this.subTitleContent)
32        .fontSize(14)
33        .fontColor($r('sys.color.ohos_id_color_text_secondary'))
34        .fontFamily('HarmonyHeiTi')
35        .fontWeight(FontWeight.Medium)
36    }
37    .width("100%")
38    .height(48)
39    .alignItems(VerticalAlign.Bottom)
40    .padding({
41      bottom: 9,
42      top: 19.5,
43      left: $r('sys.float.ohos_id_card_margin_start'),
44      right: $r("sys.float.ohos_id_card_margin_end")
45    })
46  }
47}