Skip to content
Open
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 @@ -315,6 +315,12 @@ struct MobileCardExample: View {
} label: {
Text("Left image card using cardBody")
}

NavigationLink {
FioriCardFlexItem()
} label: {
Text("FlexItem within Card Header")
}
}
.navigationBarTitle("Cards and Layouts", displayMode: .inline)
.sheet(isPresented: self.$isPresented) {
Expand All @@ -336,6 +342,22 @@ struct MobileCardExample: View {
}
}

struct FioriCardFlexItem: View {
@State private var buttonWidthMode: Int = 0
var body: some View {
List {
ForEach(0 ..< CardTests.flexItemCardSamples.count, id: \.self) { i in
CardTests.flexItemCardSamples[i]
}
.listRowBackground(Color.preferredColor(.primaryGroupedBackground))
}
.environment(\.cardFooterButtonWidthMode, CardFooterButtonWidthMode(rawValue: self.buttonWidthMode) ?? .auto)
.cardStyle(.card)
.listStyle(.plain)
.navigationBarTitle("FlexItem in card", displayMode: .inline)
}
}

struct FioriCardFeaturedContent<Content: View>: View {
let content: Content
let image: Image
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,12 @@ protocol _OverflowActionComponent {
var overflowAction: FioriButton? { get }
}

// sourcery: BaseComponent
protocol _FlexItemComponent {
@ViewBuilder
var flexItem: (() -> any View)? { get }
}

// sourcery: BaseComponent
protocol _Row1Component {
// var numberOfLines: Int { get set }
Expand Down
Loading
Loading