Skip to content

Commit

Permalink
feat: 🎸 [jira: 2572] new card footer for Joule Object Card (#706)
Browse files Browse the repository at this point in the history
* feat: 🎸 [jira: 2572] new card footer for Joule Object Card

* fix: 🐛 [jira: 2572] change the backgroud of popup in footer
  • Loading branch information
shengxu7 authored Jun 13, 2024
1 parent dd49399 commit b6aea46
Show file tree
Hide file tree
Showing 24 changed files with 1,332 additions and 166 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,19 @@ struct MobileCardExample: View {
} label: {
Text("Cards")
}

NavigationLink {
List {
ForEach(0 ..< CardTests.cardFooterSamples.count, id: \.self) { i in
CardTests.cardFooterSamples[i]
}
}
.cardStyle(.card)
.listStyle(.plain)
.navigationBarTitle("Footers", displayMode: .inline)
} label: {
Text("Footers")
}

NavigationLink {
MasonryTestView()
Expand Down Expand Up @@ -90,24 +103,26 @@ struct CarouselTestView: View {
}

var body: some View {
Carousel(numberOfColumns: Int(self.numberOfColumns), spacing: self.spacing, alignment: self.alignment == 0 ? .top : (self.alignment == 1 ? .center : .bottom), isSnapping: self.isSnapping) {
if self.contentType == 0 {
ForEach(0 ..< CardTests.cardSamples.count, id: \.self) { i in
CardTests.cardSamples[i]
}
} else {
ForEach(0 ..< 20, id: \.self) { i in
Text("Text \(i)")
.font(.title)
.padding()
.frame(height: 100)
.background(Color.gray)
ScrollView(.vertical) {
Carousel(numberOfColumns: Int(self.numberOfColumns), spacing: self.spacing, alignment: self.alignment == 0 ? .top : (self.alignment == 1 ? .center : .bottom), isSnapping: self.isSnapping) {
if self.contentType == 0 {
ForEach(0 ..< CardTests.cardSamples.count, id: \.self) { i in
CardTests.cardSamples[i]
}
} else {
ForEach(0 ..< 20, id: \.self) { i in
Text("Text \(i)")
.font(.title)
.padding()
.frame(height: 100)
.background(Color.gray)
}
}
}
.cardStyle(.card)
.padding(self.padding)
.border(Color.gray)
}
.cardStyle(.card)
.padding(self.padding)
.border(Color.gray)
.sheet(isPresented: self.$isPresented, content: {
VStack {
HStack {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change