Skip to content

Commit 29f0aa4

Browse files
authored
Update README.md
1 parent 9edac2c commit 29f0aa4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,9 @@ mesh | false | false, true |
9898

9999
##### Samples:
100100
```swift
101+
// Required
101102
@State var showNew: Bool = false
103+
// Optional (5.2.0 or above)
102104
@State var align: HorizontalAlignment = .center
103105
@State var color: Color = .accentColor
104106
@State var size: String = "normal"
@@ -123,6 +125,7 @@ SwiftNEW(show: $showNew)
123125
SwiftNEW(show: $showNew, align: $align, color: $color, size: $size, labelColor: $labelColor, label: $label, labelImage: $labelImage, history: $history, data: $data, showDrop: $showDrop)
124126
```
125127
Instead of using separate states, inline states work too. (No longer required after 5.2.0)
128+
126129
*`Show Bool` cannot be inline.
127130
```swift
128131
SwiftNEW(show: $showNew, align: .constant(.center), color: .constant(.accentColor), size: .constant("normal"), labelColor: .constant(Color(UIColor.systemBackground)), label: .constant("Show Release Note"), labelImage: .constant("arrow.up.circle.fill"), history: .constant(true), data: .constant("data"), showDrop: .constant(false))

0 commit comments

Comments
 (0)