@@ -8,17 +8,20 @@ public final class ExternalTabContainer {
88 public struct TabItem : Identifiable {
99 public var id : String
1010 public var title : String
11+ public var description : String
1112 public var image : String
1213 public let viewBuilder : ( ) -> AnyView
1314
1415 public init < V: View > (
1516 id: String ,
1617 title: String ,
18+ description: String = " " ,
1719 image: String = " " ,
1820 @ViewBuilder viewBuilder: @escaping ( ) -> V
1921 ) {
2022 self . id = id
2123 self . title = title
24+ self . description = description
2225 self . image = image
2326 self . viewBuilder = { AnyView ( viewBuilder ( ) ) }
2427 }
@@ -46,22 +49,31 @@ public final class ExternalTabContainer {
4649 public func registerTab< V: View > (
4750 id: String ,
4851 title: String ,
52+ description: String = " " ,
4953 image: String = " " ,
5054 @ViewBuilder viewBuilder: @escaping ( ) -> V
5155 ) {
52- tabs. append ( TabItem ( id: id, title: title, image: image, viewBuilder: viewBuilder) )
56+ tabs. append ( TabItem (
57+ id: id,
58+ title: title,
59+ description: description,
60+ image: image,
61+ viewBuilder: viewBuilder
62+ ) )
5363 }
5464
5565 public static func registerTab< V: View > (
5666 for tabContainerId: String ,
5767 id: String ,
5868 title: String ,
69+ description: String = " " ,
5970 image: String = " " ,
6071 @ViewBuilder viewBuilder: @escaping ( ) -> V
6172 ) {
6273 tabContainer ( for: tabContainerId) . registerTab (
6374 id: id,
6475 title: title,
76+ description: description,
6577 image: image,
6678 viewBuilder: viewBuilder
6779 )
0 commit comments