Skip to content
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: 🎸 [jira: 2572] new card footer for Joule Object Card #706

Merged
merged 3 commits into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading