feat: Working on route and id helpers for views.
This commit is contained in:
11
Sources/App/Views/Utils/AttributeExtensions.swift
Normal file
11
Sources/App/Views/Utils/AttributeExtensions.swift
Normal file
@@ -0,0 +1,11 @@
|
||||
import Elementary
|
||||
|
||||
extension HTMLAttribute where Tag: HTMLTrait.Attributes.Global {
|
||||
|
||||
static var customToggleFloatAfterRequest: Self {
|
||||
.custom(
|
||||
name: "hx-on::after-request",
|
||||
value: "if(event.detail.successful) toggleContent('float')"
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user