Created
May 27, 2020 00:08
-
-
Save SarahAlsharif/a5cc1aa51454e86fd9174d901884c82a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
struct ContentView: View { | |
@Environment(\.colorScheme) var colorScheme | |
var body: some View { | |
ZStack { | |
ZStack(alignment: .top) { | |
ShapeView().offset(x: -80, y : -389).shadow(radius: 12) | |
} | |
VStack { | |
Text(colorScheme == .light ? "Light Mode" : "Dark Mode").font(.system(size: 40)).bold().foregroundColor(colorScheme == .light ? textColorLight : textColorDark ) | |
}.offset(y: 50).padding() | |
ShapeView().offset(x: 80, y : 389).shadow(radius: 12) | |
}.background(colorScheme == .light ? bgColorLight: bgColorDark) | |
.edgesIgnoringSafeArea(.all) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment