-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: 🎸 [HCPSDKFIORIUIKIT-2896]Card Insert Custom Component #998
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -49,6 +49,169 @@ struct MobileCardExample: View { | |||||
} label: { | ||||||
Text("Carousel") | ||||||
} | ||||||
NavigationLink { | ||||||
ScrollView { | ||||||
Section { | ||||||
Card(title: { | ||||||
Text("Kixo Q1 Deal ") | ||||||
}, subtitle: { | ||||||
Text("Company Name") | ||||||
}, detailImage: { | ||||||
Circle() | ||||||
.strokeBorder(.gray, lineWidth: 1) | ||||||
.background(Circle().fill(Color.gray.opacity(0.3))) | ||||||
.frame(width: 60, height: 60) | ||||||
.overlay { | ||||||
Image(systemName: "bus.fill") | ||||||
.font(.title) | ||||||
} | ||||||
}, headerAction: { | ||||||
Text("99") | ||||||
.font(.system(size: 22)) | ||||||
.frame(width: 38, height: 36) | ||||||
.foregroundStyle(Color.white) | ||||||
.background(RoundedRectangle(cornerRadius: 12.0).fill(Color.red)) | ||||||
}, row2: { | ||||||
Text("15 Jan,2025 • Discovery completed") | ||||||
.font(.callout) | ||||||
}, row3: { | ||||||
VStack { | ||||||
Text("in progress") | ||||||
.foregroundStyle(Color(hex: "#AA0808")) | ||||||
.font(.subheadline) | ||||||
} | ||||||
|
||||||
}) | ||||||
.padding() | ||||||
.cardStyle(.card) | ||||||
} header: { | ||||||
Text("custom elements on main header") | ||||||
.padding(.leading, 20) | ||||||
.fontWeight(.bold) | ||||||
}.padding(.bottom, 10) | ||||||
Section { | ||||||
Card(title: { | ||||||
Text("Kixo Q1 Deal ") | ||||||
}, subtitle: { | ||||||
Text("Company Name") | ||||||
}, detailImage: { | ||||||
RoundedRectangle(cornerRadius: 8) | ||||||
.strokeBorder(.gray, lineWidth: 1) | ||||||
.frame(width: 60, height: 60) | ||||||
.overlay { | ||||||
Image(systemName: "bus.fill") | ||||||
.font(.title) | ||||||
} | ||||||
}, row1: { | ||||||
Text("99") | ||||||
.frame(width: 48, height: 36) | ||||||
.foregroundStyle(Color.white) | ||||||
.background(RoundedRectangle(cornerRadius: 12.0).fill(Color.green)) | ||||||
}, row2: { | ||||||
HStack { | ||||||
RoundedRectangle(cornerRadius: 4) | ||||||
.strokeBorder(.gray, lineWidth: 1) | ||||||
.frame(width: 16, height: 16) | ||||||
.overlay { | ||||||
Image(systemName: "hare.circle.fill") | ||||||
} | ||||||
Text("Kixo Inc • Open") | ||||||
.foregroundStyle(Color(hex: "#AA0808")) | ||||||
.font(.subheadline) | ||||||
} | ||||||
}, row3: { | ||||||
HStack { | ||||||
Circle() | ||||||
.strokeBorder(.gray, lineWidth: 1) | ||||||
.background(Circle().fill(Color.gray.opacity(0.3))) | ||||||
.frame(width: 16, height: 16) | ||||||
.overlay { | ||||||
Image(systemName: "tortoise.circle.fill") | ||||||
} | ||||||
Text("Madlyn Riley Jackson") | ||||||
.foregroundStyle(Color(hex: "#AA0808")) | ||||||
.font(.subheadline) | ||||||
} | ||||||
|
||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove empty line |
||||||
}, kpiCaption: { | ||||||
VStack { | ||||||
Spacer() | ||||||
HStack { | ||||||
Text("100.000") | ||||||
.font(.system(size: 22)) | ||||||
.foregroundStyle(Color.preferredColor(.primaryLabel)) | ||||||
Text("USD") | ||||||
.font(.system(size: 17)) | ||||||
.foregroundStyle(Color.preferredColor(.primaryLabel)) | ||||||
} | ||||||
} | ||||||
|
||||||
}) | ||||||
.padding() | ||||||
.cardStyle(.card) | ||||||
} header: { | ||||||
Text("custom elements for Tag Component") | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why this is for Tag Component? Did not see "tag" is used in the example code. |
||||||
.padding(.leading, 20) | ||||||
.fontWeight(.bold) | ||||||
}.padding(.bottom, 10) | ||||||
Section { | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. add a empty line above line 157 |
||||||
Card(title: { | ||||||
Text("Kixo Q1 Deal ") | ||||||
}, subtitle: { | ||||||
Text("Company Name") | ||||||
}, detailImage: { | ||||||
RoundedRectangle(cornerRadius: 8) | ||||||
.strokeBorder(.gray, lineWidth: 1) | ||||||
.frame(width: 60, height: 60) | ||||||
.overlay { | ||||||
Image(systemName: "bus.fill") | ||||||
.font(.title) | ||||||
} | ||||||
}, row2: { | ||||||
HStack { | ||||||
RoundedRectangle(cornerRadius: 4) | ||||||
.strokeBorder(.gray, lineWidth: 1) | ||||||
.frame(width: 16, height: 16) | ||||||
.overlay { | ||||||
Image(systemName: "hare.circle.fill") | ||||||
} | ||||||
Text("Kixo Inc • Open") | ||||||
.foregroundStyle(Color(hex: "#AA0808")) | ||||||
.font(.subheadline) | ||||||
} | ||||||
}, row3: { | ||||||
HStack { | ||||||
Circle() | ||||||
.strokeBorder(.gray, lineWidth: 1) | ||||||
.background(Circle().fill(Color.gray.opacity(0.3))) | ||||||
.frame(width: 16, height: 16) | ||||||
.overlay { | ||||||
Image(systemName: "tortoise.circle.fill") | ||||||
} | ||||||
Text("Madlyn Riley Jackson") | ||||||
.foregroundStyle(Color(hex: "#AA0808")) | ||||||
.font(.subheadline) | ||||||
} | ||||||
|
||||||
}, kpiCaption: { | ||||||
Text("99") | ||||||
.frame(width: 48, height: 36) | ||||||
.font(.system(size: 22)) | ||||||
.foregroundStyle(Color.white) | ||||||
.background(RoundedRectangle(cornerRadius: 12.0).fill(Color.green)) | ||||||
}) | ||||||
.padding() | ||||||
.cardStyle(.card) | ||||||
} header: { | ||||||
Text("custom elements for KIP Component") | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
.padding(.leading, 20) | ||||||
.fontWeight(.bold) | ||||||
}.padding(.bottom, 10) | ||||||
} | ||||||
|
||||||
} label: { | ||||||
Text("Cards custom score component") | ||||||
} | ||||||
} | ||||||
.navigationBarTitle("Cards", displayMode: .inline) | ||||||
} | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add empty line above line 92