-
-
Save sturdysturge/748bbd345004e6f8258a27ae2cf3bb2c 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
struct ContentView: View { | |
@State var text: String = "" | |
@State var fontWeight = WeightType.regular | |
@State var fontSize = CGFloat(12) | |
@State var foregroundColor = Color.primary | |
var body: some View { | |
ScrollView(.vertical) { | |
VStack { | |
TextEditorView(text: $text, | |
fontSize: fontSize, | |
fontWeight: fontWeight.weight, | |
foregroundColor: foregroundColor) | |
HStack { | |
DeleteAllButton(text: $text) | |
FontColourPicker(colour: $foregroundColor) | |
} | |
.frame(height: 50) | |
FontSizeStepper(fontSize: $fontSize) | |
FontWeightPicker(fontWeight: $fontWeight) | |
} | |
.padding(.horizontal) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment