Skip to content

Commit 1f68c16

Browse files
committed
ADD: ResultBuilder Optional
1 parent 99aa98d commit 1f68c16

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Sources/OpenTDS/Component/Button/Toolbar/ToolbarButton+Ext.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@ import SwiftUI
22

33
@resultBuilder
44
public struct TossToolbarButtonBuilder {
5+
56
public static func buildBlock(_ components: TossToolbarButton...) -> [TossToolbarButton] {
67
components
78
}
9+
10+
static func buildOptional(_ component: TossToolbarButton?) -> TossToolbarButton? {
11+
return component ?? nil
12+
}
813
}

0 commit comments

Comments
 (0)