Impressia/Vernissage/Widgets/BottomRight.swift

34 lines
660 B
Swift
Raw Normal View History

2023-01-03 14:09:22 +01:00
//
// https://mczachurski.dev
// Copyright © 2023 Marcin Czachurski and the repository contributors.
2023-03-28 10:35:38 +02:00
// Licensed under the Apache License 2.0.
2023-01-03 14:09:22 +01:00
//
import SwiftUI
struct BottomRight<Content: View>: View {
let content: Content
init(@ViewBuilder content: () -> Content) {
self.content = content()
}
2023-01-03 14:09:22 +01:00
var body: some View {
2023-01-13 21:11:30 +01:00
VStack(alignment: .trailing) {
2023-01-03 14:09:22 +01:00
Spacer()
HStack {
Spacer()
content
}
}
}
}
struct BottomRight_Previews: PreviewProvider {
static var previews: some View {
BottomRight {
Text("1/2")
}
}
}