AutorÃa | Ultima modificación | Ver Log |
//
// MyCapsulesHeaderView.swift
// twogetskills
//
// Created by Efrain Yanez Recanatini on 7/27/22.
//
import SwiftUI
struct MyCapsulesHeaderView : View {
@Binding var showInProgress : Bool
let firstName : String
var body : some View {
//Inicio de Saluo
HStack {
Text(Config.LANG_MY_CAPSULES_GREATING)
.font(Font.custom(Config.FONT_NAME_BOLD, size: Config.FONT_SIZE_MY_CAPSULES_HEAD_1))
.foregroundColor(Color("color_textview_foreground"))
Text(firstName)
.font(Font.custom(Config.FONT_NAME_BOLD, size: Config.FONT_SIZE_MY_CAPSULES_HEAD_1))
.foregroundColor(Color("color_textview_foreground"))
Spacer()
Button(action :{
withAnimation {
self.showInProgress.toggle()
}
}, label: {
Image(systemName: self.showInProgress ? "chevron.down" : "chevron.up")
.resizable()
.aspectRatio(contentMode: .fit)
.frame(width: 16, height: 16, alignment: .center)
})
.foregroundColor(Color("color_textview_foreground"))
.padding(.trailing, 16)
}
.padding(.leading, 16)
.padding(.top, 10)
//Fin Saludo
}
}
struct MyCapsulesHeaderView_Previews: PreviewProvider {
@State static var showInProgress : Bool = true
static var previews: some View {
MyCapsulesHeaderView(showInProgress: self.$showInProgress, firstName: "Usuario de prueba")
}
}