portico/Sources/Portico/Extensions/ExpanderRow+Extras.swift

24 lines
No EOL
998 B
Swift

import Adw
extension WidgetView where Target: Adw.ExpanderRow {
/// Applies the `.property` style class.
///
/// De-emphasizes the row title and emphasizes the subtitle, for read-only properties; typically paired with a selectable subtitle. Since libadwaita 1.4.
///
/// - Parameter enabled: Whether the style class is applied.
/// - Returns: A copy of this view with the modifier applied.
public func property(_ enabled: Bool = true) -> Self {
styleClass("property", enabled)
}
/// Applies the `.property` style class.
///
/// De-emphasizes the row title and emphasizes the subtitle, for read-only properties; typically paired with a selectable subtitle. Since libadwaita 1.4.
///
/// - Parameter enabled: A binding that controls whether the class is applied.
/// - Returns: A copy of this view with the modifier applied.
public func property(_ enabled: Binding<Bool>) -> Self {
styleClass("property", enabled)
}
}