Skip to content

Commit

Permalink
🔀 Merge branch 'hugo/refactor/Refactor-Carereceiver-cell-UI'
Browse files Browse the repository at this point in the history
  • Loading branch information
ladislas committed Feb 12, 2024
2 parents e3a45b3 + a987a75 commit 582465e
Showing 1 changed file with 22 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,27 @@ struct CarereceiverAvatarCell: View {

var body: some View {
VStack(spacing: 10) {
ZStack {
Image(self.carereceiver.avatar, bundle: Bundle(for: DesignKitResources.self))
.resizable()
.aspectRatio(contentMode: .fit)
.clipShape(Circle())

Circle()
.strokeBorder(self.strokeColor, lineWidth: 2)
.background {
Circle()
.fill(Color(uiColor: UIColor.systemGray6))
}
.overlay {
Image(uiImage: self.rootOwnerViewModel.getReinforcerFor(index: self.carereceiver.reinforcer))
.resizable()
.aspectRatio(contentMode: .fit)
.padding(5)
}
.frame(maxWidth: 60)
.offset(x: 50, y: -45)
}
.frame(maxWidth: 120)
Image(self.carereceiver.avatar, bundle: Bundle(for: DesignKitResources.self))
.resizable()
.aspectRatio(contentMode: .fit)
.clipShape(Circle())
.overlay {
Circle()
.strokeBorder(self.strokeColor, lineWidth: 2)
.background {
Circle()
.fill(Color(uiColor: UIColor.systemGray6))
}
.overlay {
Image(uiImage: self.rootOwnerViewModel.getReinforcerFor(index: self.carereceiver.reinforcer))
.resizable()
.aspectRatio(contentMode: .fit)
.padding(5)
}
.frame(maxWidth: 60)
.offset(x: 60, y: 40)
}
.frame(maxWidth: 120)

Text(self.carereceiver.name)
.font(.headline)
Expand All @@ -46,5 +45,5 @@ struct CarereceiverAvatarCell: View {
}

#Preview {
CarereceiverAvatarCell(carereceiver: Carereceiver(name: "Chantal", avatar: DesignKitAsset.Avatars.avatarsBoy4f.name, reinforcer: 2))
CarereceiverAvatarCell(carereceiver: Carereceiver(name: "Chantal", avatar: DesignKitAsset.Avatars.avatarsPictogramsAnimalsSavannaKangarooBrown0078.name, reinforcer: 2))
}

0 comments on commit 582465e

Please sign in to comment.