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
Expand Up @@ -138,6 +138,20 @@ protocol _SecondaryActionComponent {
var secondaryAction: FioriButton? { get }
}

// sourcery: BaseComponent
protocol _TertiaryActionComponent {
// sourcery: @ViewBuilder
var tertiaryAction: FioriButton? { get }
}

// sourcery: BaseComponent
protocol _OverflowActionComponent {
// sourcery: @ViewBuilder
// sourcery: defaultValue = "FioriButton { _ in Image(systemName: "ellipsis") }"
// sourcery: resultBuilder.defaultValue = "{ FioriButton { _ in Image(systemName: "ellipsis") } }"
var overflowAction: FioriButton? { get }
}

// sourcery: BaseComponent
protocol _Row1Component {
// var numberOfLines: Int { get set }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ protocol _CardMainHeaderComponent: _TitleComponent, _SubtitleComponent, _IconsCo
protocol _CardExtHeaderComponent: _Row1Component, _Row2Component, _Row3Component, _KpiComponent, _KpiCaptionComponent {}

// sourcery: CompositeComponent
protocol _CardFooterComponent: _ActionComponent, _SecondaryActionComponent {}
protocol _CardFooterComponent: _ActionComponent, _SecondaryActionComponent, _TertiaryActionComponent, _OverflowActionComponent {}

// sourcery: CompositeComponent
protocol _CardHeaderComponent: _CardMediaComponent, _CardMainHeaderComponent, _CardExtHeaderComponent {}
Expand Down
Loading

0 comments on commit b6aea46

Please sign in to comment.