Skip to content

Commit

Permalink
docs: update SwiftUI example
Browse files Browse the repository at this point in the history
  • Loading branch information
chrwendt committed Mar 30, 2020
1 parent ce9aa1d commit 466daa0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,12 @@ With SwiftUI projects the color picker can't be used inside the action sheet tha
```swift
struct ContentView: View {
@State var selectedColor: UIColor = UIColor.white

let config = SheetyColorsConfig(alphaEnabled: true, hapticFeedbackEnabled: true, initialColor: UIColor.red, type: .rgb)

var body: some View {
Text("Select a color")
.foregroundColor(Color(self.$selectedColor.wrappedValue))
SheetyColorsView(color: $selectedColor)
ColorPicker(config: config, color: self.$selectedColor)
}
}
```
Expand Down

0 comments on commit 466daa0

Please sign in to comment.