Add simplified Account Header image view without stacks

This commit is contained in:
Rizwan Mohamed Ibrahim 2020-07-08 14:44:27 +05:30
parent 48f212abcd
commit ea3149d5bc
No known key found for this signature in database
GPG Key ID: D5BEE468D448BCC5
1 changed files with 11 additions and 14 deletions

View File

@ -11,22 +11,19 @@ import RSCore
struct AccountHeaderImageView: View {
var image: RSImage
var body: some View {
HStack {
Spacer()
Image(rsImage: image)
.resizable()
.aspectRatio(1, contentMode: .fit)
.frame(height: 48, alignment: .center)
.padding()
Spacer()
}
}
var body: some View {
Image(rsImage: image)
.resizable()
.aspectRatio(1, contentMode: .fit)
.frame(height: 48, alignment: .center)
.padding()
}
}
struct AccountHeaderImageView_Previews: PreviewProvider {
static var previews: some View {
static var previews: some View {
AccountHeaderImageView(image: AppAssets.image(for: .onMyMac)!)
}
}
}