@Component export struct YtButton { btHeight: Length = 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 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) } }