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

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