@Component export struct YtButton { btHeight: number = 37 btWidth: Length = '100%' btContent: string = '' click = () => { } btPadding?: Length | Padding btFontSize: number = 12 bgc: ResourceColor = $r('app.color.main_ac_color_dark') btFontColor: ResourceColor = Color.White btBorder?: BorderOptions btState: boolean = true btBorderRadius: Length | BorderRadiuses | LocalizedBorderRadiuses = this.btHeight / 2 build() { Button(this.btContent) .buttonStyle(ButtonStyleMode.NORMAL) .fontSize($r(`app.float.page_text_font_size_${this.btFontSize}`)) .fontColor(this.btFontColor) .backgroundColor(this.bgc) .height(this.btHeight) .width(this.btWidth) .onClick(this.click) .padding(this.btPadding ?? {}) .border(this.btBorder) .enabled(this.btState) .borderRadius(this.btBorderRadius) } }