File tree Expand file tree Collapse file tree 3 files changed +11
-10
lines changed
OUDS/Core/Components/Sources/ContentDisplay/BulletList Expand file tree Collapse file tree 3 files changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -162,7 +162,7 @@ private struct OrderedBullet: View {
162162 Group {
163163 switch level {
164164 case . zero:
165- Text ( String ( " \( index + 1 ) . " ) ) // NOTE: Use String cast to prevent Xcode to generated useless Localizable
165+ Text ( String ( " \( index + 1 ) . " ) ) // NOTE: Use String cast to prevent Xcode to generated useless Localizable
166166 case . one:
167167 let character = Character ( UnicodeScalar ( UInt8 ( ascii: " A " ) + index) )
168168 Text ( String ( character) + " . " )
Original file line number Diff line number Diff line change @@ -54,10 +54,11 @@ struct BulletListItem: View {
5454 // MARK: - Private helpers
5555
5656 private var spacing : Double {
57- if textStyle == . bodyMedium, level == . zero {
58- theme. bulletList. spaceColumnGapBodyMedium
59- } else {
57+ switch textStyle {
58+ case . bodyLarge:
6059 theme. bulletList. spaceColumnGapBodyLarge
60+ case . bodyMedium:
61+ theme. bulletList. spaceColumnGapBodyMedium
6162 }
6263 }
6364
@@ -73,18 +74,18 @@ struct BulletListItem: View {
7374 }
7475
7576 private var verticalPadding : Double {
76- if textStyle == . bodyMedium, level == . zero {
77- theme. bulletList. spacePaddingBlockBodyMedium
78- } else {
77+ switch textStyle {
78+ case . bodyLarge:
7979 theme. bulletList. spacePaddingBlockBodyLarge
80+ case . bodyMedium:
81+ theme. bulletList. spacePaddingBlockBodyMedium
8082 }
8183 }
8284
8385 private var nextLevel : OUDSBulletList . NestedLevel {
8486 guard let nextLevel = OUDSBulletList . NestedLevel ( rawValue: level. rawValue + 1 ) else {
8587 OL . fatal ( " It is forbidden by design to have more than 3 levels depth. Children of ' \( item. text) ' are too much. " )
8688 }
87-
8889 return nextLevel
8990 }
9091}
Original file line number Diff line number Diff line change @@ -217,9 +217,9 @@ public struct OUDSBulletList: View {
217217 /// List items are typically marked with bullets, but it is also possible to use a tick or any Solaris icon.
218218 ///
219219 /// - Parameters:
220- /// - icon: The type of icon the unordered item should be used, Bullet as default
220+ /// - icon: The type of icon the unordered item should be used, Bullet as default and branded
221221 /// - isBranded: Flag used to display icon tinted with brand color. false by default
222- case unordered( icon: UnorderedIcon = . bullet, isBranded: Bool = false )
222+ case unordered( icon: UnorderedIcon = . bullet, isBranded: Bool = true )
223223
224224 /// Collects related items with numeric order or sequence. Numbering starts at 1 with the first list item and increases
225225 /// by increments of 1 for each successive ordered list item.
You can’t perform that action at this time.
0 commit comments