@Component export struct YTButton { btHeight: number = 37 btWidth: Length = '100%' btContent: string = '' 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 btlinear?: LinearGradientOptions click = () => { } build() { Button(this.btContent) .buttonStyle(ButtonStyleMode.NORMAL) .fontSize(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) .linearGradient(this.btlinear) } }