@@ -64,57 +64,6 @@ struct SetupView: View {
|
||||
}
|
||||
}
|
||||
|
||||
func CarouselText(_ txt: String) -> some View {
|
||||
return Text(txt)
|
||||
}
|
||||
|
||||
struct CarouselItem: Identifiable {
|
||||
let image: Image
|
||||
let text: Text
|
||||
|
||||
let id = UUID().uuidString
|
||||
}
|
||||
|
||||
struct CarouselItemView: View {
|
||||
let item: CarouselItem
|
||||
|
||||
var body: some View {
|
||||
VStack(spacing: 30) {
|
||||
item.image
|
||||
.resizable()
|
||||
.frame(width: 120, height: 120)
|
||||
item.text
|
||||
.multilineTextAlignment(.center)
|
||||
.font(.title2)
|
||||
.foregroundColor(Color.white)
|
||||
.padding([.leading,.trailing], 50.0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let carousel_items = [
|
||||
CarouselItem(image: Image("digital-nomad"), text: Text("Welcome to the social network \(Text("you").italic()) control.")),
|
||||
CarouselItem(image: Image("encrypted-message"),
|
||||
text: Text("\(Text("Encrypted").bold()). End-to-End encrypted private messaging. Keep Big Tech out of your DMs")),
|
||||
CarouselItem(image: Image("undercover"),
|
||||
text: Text("\(Text("Private").bold()). Creating an account doesn't require a phone number, email or name. Get started right away with zero friction.")),
|
||||
CarouselItem(image: Image("bitcoin-p2p"),
|
||||
text: Text("\(Text("Earn Money").bold()). Tip your friend's posts and stack sats with Bitcoin⚡️, the native currency of the internet."))
|
||||
]
|
||||
|
||||
struct CarouselView: View {
|
||||
var body: some View {
|
||||
TabView {
|
||||
ForEach(carousel_items) { item in
|
||||
CarouselItemView(item: item)
|
||||
.tabItem {
|
||||
Text(item.image)
|
||||
}
|
||||
}
|
||||
}
|
||||
.tabViewStyle(PageTabViewStyle())
|
||||
}
|
||||
}
|
||||
|
||||
struct SetupView_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
|
||||
Reference in New Issue
Block a user