diff --git a/Sources/Ignite/Extensions/FormatStyle-NonLocalizedDecimal.swift b/Sources/Ignite/Extensions/FormatStyle-NonLocalizedDecimal.swift index c210a828..d472968a 100644 --- a/Sources/Ignite/Extensions/FormatStyle-NonLocalizedDecimal.swift +++ b/Sources/Ignite/Extensions/FormatStyle-NonLocalizedDecimal.swift @@ -10,13 +10,13 @@ import Foundation extension FormatStyle where Self == FloatingPointFormatStyle, FormatInput == Double { /// A format style that displays a floating point number with one decimal place, enforcing the use of a `.` as the decimal separator. static var nonLocalizedDecimal: Self { - nonLocalizedDecimal(decimalPlaces: 1) + nonLocalizedDecimal(places: 1) } /// A format style that displays a floating point number enforcing the use of a `.` as the decimal separator. - /// - Parameter decimalPlaces: The number of decimal places to display. Defaults to 1. - static func nonLocalizedDecimal(decimalPlaces: Int = 1) -> Self { - let precision = max(0, decimalPlaces) + /// - Parameter places: The number of decimal places to display. Defaults to 1. + static func nonLocalizedDecimal(places: Int = 1) -> Self { + let precision = max(0, places) return FloatingPointFormatStyle() .precision(.fractionLength(0...precision)) .locale(Locale(identifier: "en_US")) @@ -26,13 +26,13 @@ extension FormatStyle where Self == FloatingPointFormatStyle, FormatInpu extension FormatStyle where Self == FloatingPointFormatStyle, FormatInput == Float { /// A format style that displays a floating point number with one decimal place, enforcing the use of a `.` as the decimal separator. static var nonLocalizedDecimal: Self { - nonLocalizedDecimal(decimalPlaces: 1) + nonLocalizedDecimal(places: 1) } /// A format style that displays a floating point number enforcing the use of a `.` as the decimal separator. - /// - Parameter decimalPlaces: The number of decimal places to display. Defaults to 1. - static func nonLocalizedDecimal(decimalPlaces: Int = 1) -> Self { - let precision = max(0, decimalPlaces) + /// - Parameter places: The number of decimal places to display. Defaults to 1. + static func nonLocalizedDecimal(places: Int = 1) -> Self { + let precision = max(0, places) return FloatingPointFormatStyle() .precision(.fractionLength(0...precision)) .locale(Locale(identifier: "en_US")) diff --git a/Sources/Ignite/Modifiers/Opacity.swift b/Sources/Ignite/Modifiers/Opacity.swift index a0fdd941..f291da47 100644 --- a/Sources/Ignite/Modifiers/Opacity.swift +++ b/Sources/Ignite/Modifiers/Opacity.swift @@ -34,9 +34,9 @@ struct OpacityModifier: HTMLModifier { /// - Returns: The modified HTML with opacity applied func body(content: some HTML) -> any HTML { if let percentage, percentage != 100% { - content.style(.opacity, percentage.value.formatted(.nonLocalizedDecimal(decimalPlaces: 3))) + content.style(.opacity, percentage.value.formatted(.nonLocalizedDecimal(places: 3))) } else if let doubleValue, doubleValue != 1 { - content.style(.opacity, doubleValue.formatted(.nonLocalizedDecimal(decimalPlaces: 3))) + content.style(.opacity, doubleValue.formatted(.nonLocalizedDecimal(places: 3))) } content }