PeopleShipHomePageAttestationComponent.ets 1.03 KB
@Component
export struct PeopleShipHomePageAttestationComponent {
  @Prop name: string
  @Prop content: string
  build() {
    Row() {
      Text(this.name)
        .lineHeight('18vp')
        .fontColor($r('app.color.color_ED2800'))
        .fontSize($r('app.float.vp_11'))
        .backgroundColor($r('app.color.color_1AED2800'))
        .textAlign(TextAlign.Center)
        .borderRadius('2vp')
        .margin({
          right: '4vp',
          left: '16vp',
        })
        .padding({
          top: '1vp',
          bottom: '1vp',
          right: '4vp',
          left: '4vp'
        })

      Text(this.content)
        .lineHeight('18vp')
        .fontSize($r('app.float.vp_12'))
        .layoutWeight(1)
        .fontColor($r('app.color.color_222222'))
        .textAlign(TextAlign.Start)
        .align(Alignment.Center)
        .padding(0)
        .margin({
          right: '16vp'
        })
        .padding({
          top: '1vp',
          bottom: '1vp',
        })
    }
    .width('100%')
    .alignItems(VerticalAlign.Top)
  }
}