Use new wrap modifier
This commit is contained in:
parent
19aa17c0ab
commit
6b76a4c8f4
@ -271,13 +271,6 @@ extension AnyView {
|
|||||||
style("frame", active: active)
|
style("frame", active: active)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Run a function when the view gets an update.
|
|
||||||
/// - Parameter onUpdate: The function.
|
|
||||||
/// - Returns: A view.
|
|
||||||
public func onUpdate(_ onUpdate: @escaping () -> Void) -> AnyView {
|
|
||||||
inspect { _, _ in onUpdate() }
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Bind to the view's focus.
|
/// Bind to the view's focus.
|
||||||
/// - Parameter focus: Whether the view is focused.
|
/// - Parameter focus: Whether the view is focused.
|
||||||
/// - Returns: A view.
|
/// - Returns: A view.
|
||||||
@ -341,7 +334,7 @@ extension AnyView {
|
|||||||
/// - getString: Get the CSS.
|
/// - getString: Get the CSS.
|
||||||
/// - Returns: A view.
|
/// - Returns: A view.
|
||||||
public func css(scheme: ColorScheme? = nil, getString: @escaping () -> String) -> AnyView {
|
public func css(scheme: ColorScheme? = nil, getString: @escaping () -> String) -> AnyView {
|
||||||
inspect { storage, updateProperties in
|
wrap { storage, updateProperties in
|
||||||
let cssID = "internal-css"
|
let cssID = "internal-css"
|
||||||
let providerID = "internal-css-provider"
|
let providerID = "internal-css-provider"
|
||||||
let previous = storage.fields[cssID] as? String
|
let previous = storage.fields[cssID] as? String
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user