Skip to content

Commit 7baf127

Browse files
committed
refactor: 💡 [JIRA:HCPSDKFIORIUIKIT-2881] ContactItem Refactor
1 parent 8f5b3ff commit 7baf127

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

Sources/FioriSwiftUICore/_FioriStyles/CardStyle.fiori.swift

+16-10
Original file line numberDiff line numberDiff line change
@@ -759,11 +759,14 @@ public enum CardTests {
759759
}
760760
} cardBody: {
761761
VStack(alignment: .leading, spacing: 4) {
762-
_ContactItem(title: "Title",
763-
subtitle: "Subtitle",
764-
actionItems: _ActivityItems(actionItems: [.init(type: .phone), .init(type: .email)], didSelectActivityItem: { dataType in
765-
print("\(dataType)")
766-
}))
762+
ContactItem(title: "Title", subtitle: "Subtitle", activityItems: [
763+
.init(type: .phone, didSelectActivityItem: {
764+
print("phone")
765+
}),
766+
.init(type: .email, didSelectActivityItem: {
767+
print("email")
768+
})
769+
])
767770

768771
Map(coordinateRegion: .constant(CardTests.region))
769772
.frame(height: 200)
@@ -793,11 +796,14 @@ public enum CardTests {
793796
}
794797
} cardBody: {
795798
VStack(alignment: .center, spacing: 4) {
796-
_ContactItem(title: "Title",
797-
subtitle: "Subtitle",
798-
actionItems: _ActivityItems(actionItems: [.init(type: .phone), .init(type: .email)], didSelectActivityItem: { dataType in
799-
print("\(dataType)")
800-
}))
799+
ContactItem(title: "Title", subtitle: "Subtitle", activityItems: [
800+
.init(type: .phone, didSelectActivityItem: {
801+
print("phone")
802+
}),
803+
.init(type: .email, didSelectActivityItem: {
804+
print("email")
805+
})
806+
])
801807

802808
KPIItem(data: .components([.unit("R"), .metric("294"), .unit("L")]), subtitle: "Label")
803809
}

0 commit comments

Comments
 (0)