• 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@CustomDialog
17export struct mainDialog {
18  private controller: CustomDialogController
19
20  build() {
21    Column() {
22      Text($r('app.string.mainDialog_inputText'))
23        .fontSize(16)
24        .fontFamily('HarmonyHeiTi')
25        .fontColor(Color.White)
26      Row() {
27        Button({ stateEffect: false }) {
28          Text($r('app.string.mainDialog_know'))
29            .fontColor('#5291FF')
30            .fontSize(17)
31        }
32        .layoutWeight(7)
33        .backgroundColor('#2F2F30')
34        .margin(5)
35        .onClick(() => {
36          this.controller.close()
37        })
38
39      }
40      .width('100%')
41      .margin({ top: '2%' })
42    }
43    .width('26%')
44    .padding({ top: '3%', left: '2%', right: '2%', bottom: '2%' })
45    .borderRadius(24)
46    .backgroundColor('#2F2F30')
47  }
48}