-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: 🎸 [JIRA-HCPSDKFIORIUIKIT-2606] Form Cells: Mandator Field (#701)
* feat: 🎸 [JIRA-HCPSDKFIORIUIKIT-2606] Form Cells: Mandator Field feat: [JIRA-HCPSDKFIORIUIKIT-2606] Form Cells: Mandatory Field Indicator * feat: 🎸 [JIRA-HCPSDKFIORIUIKIT-2606]Form Cells: Mandatory Field * feat: 🎸 [JIRA-HCPSDKFIORIUIKIT-2606]Form Cells: Mandatory Field * feat: 🎸 [JIRA-HCPSDKFIORIUIKIT-2606]Form Cells: Mandatory Field [JIRA-HCPSDKFIORIUIKIT-2606]Form Cells: Mandatory Field Indicator * feat: 🎸 [JIRA-HCPSDKFIORIUIKIT-2606]Form Cells: Mandatory Field * feat: 🎸 [JIRA-HCPSDKFIORIUIKIT-2606]Form Cells: Mandatory Field --------- Co-authored-by: I824136 <xiaoqing.he@sap.com>
- Loading branch information
1 parent
a162013
commit 2a2d97f
Showing
31 changed files
with
488 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
Sources/FioriSwiftUICore/_FioriStyles/MandatoryFieldIndicatorStyle.fiori.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import FioriThemeManager | ||
import Foundation | ||
import SwiftUI | ||
|
||
// Base Layout style | ||
public struct MandatoryFieldIndicatorBaseStyle: MandatoryFieldIndicatorStyle { | ||
@ViewBuilder | ||
public func makeBody(_ configuration: MandatoryFieldIndicatorConfiguration) -> some View { | ||
// Add default layout here | ||
configuration.mandatoryFieldIndicator | ||
} | ||
} | ||
|
||
// Default fiori styles | ||
public struct MandatoryFieldIndicatorFioriStyle: MandatoryFieldIndicatorStyle { | ||
@ViewBuilder | ||
public func makeBody(_ configuration: MandatoryFieldIndicatorConfiguration) -> some View { | ||
MandatoryFieldIndicator(configuration) | ||
// Add default style here | ||
.foregroundStyle(Color.preferredColor(.primaryLabel)) | ||
.font(.fiori(forTextStyle: .subheadline, weight: .semibold)) | ||
.accessibilityLabel(NSLocalizedString("Required Field", tableName: "FioriSwiftUICore", bundle: Bundle.accessor, comment: "Required Field")) | ||
} | ||
} |
Oops, something went wrong.