Add simplified Account Header image view without stacks
This commit is contained in:
parent
48f212abcd
commit
ea3149d5bc
|
@ -12,21 +12,18 @@ 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)!)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue